mysql-cocoa-users Mailing List for MySQL Objective C API for Cocoa (Page 4)
Brought to you by:
sergecohen
You can subscribe to this list here.
2002 |
Jan
(2) |
Feb
|
Mar
(14) |
Apr
(5) |
May
(23) |
Jun
(8) |
Jul
(13) |
Aug
(5) |
Sep
|
Oct
(1) |
Nov
(11) |
Dec
(4) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(9) |
Feb
(6) |
Mar
(13) |
Apr
(2) |
May
(3) |
Jun
|
Jul
(5) |
Aug
(11) |
Sep
(18) |
Oct
(1) |
Nov
(15) |
Dec
(2) |
2004 |
Jan
(3) |
Feb
(3) |
Mar
(8) |
Apr
(1) |
May
(2) |
Jun
(3) |
Jul
(15) |
Aug
(36) |
Sep
(5) |
Oct
|
Nov
(6) |
Dec
(2) |
2005 |
Jan
(1) |
Feb
(11) |
Mar
(1) |
Apr
(6) |
May
|
Jun
(7) |
Jul
(3) |
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
2006 |
Jan
(9) |
Feb
(5) |
Mar
(2) |
Apr
(1) |
May
(9) |
Jun
(2) |
Jul
(1) |
Aug
(4) |
Sep
|
Oct
(1) |
Nov
|
Dec
(2) |
2007 |
Jan
(23) |
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2008 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Michael T. <mta...@ap...> - 2005-04-19 08:39:06
|
Well, I tracked it a bit and found the returned array from theField = mysql_fetch_fields(mResult); does not contains the number of entries according to theNumFields = [self numOfFields]; In fact, theNumFields seem to have a proper value, theField only contains one entry 'id'. Please have a look at MCPResult.m:440. The following output shows that there is a NULL element among the resulting fields. I lost now. Does anyone have an idea? (gdb) print theField[0] $1 = { name = 0x28759a0 "id", table = 0x28759a8 "id", org_table = 0x2875990 "faqdata", db = 0x2875998 "faqdata", def = 0x2875988 "faq", length = 42424704, max_length = 0, flags = 11, decimals = 1, type = FIELD_TYPE_SHORT } Current language: auto; currently objective-c (gdb) print theField[1] $2 = { name = 0x2 <Address 0x2 out of bounds>, table = 0x7 <Address 0x7 out of bounds>, org_table = 0x7 <Address 0x7 out of bounds>, db = 0x3 <Address 0x3 out of bounds>, def = 0x3 <Address 0x3 out of bounds>, length = 0, max_length = 49667, flags = 0, decimals = 63, type = FIELD_TYPE_LONG } (gdb) print theField[2] $3 = { name = 0x28759d0 "lang", table = 0x28759d8 "lang", org_table = 0x28759c0 "faqdata", db = 0x28759c8 "faqdata", def = 0x28759b8 "faq", length = 42424752, max_length = 0, flags = 5, decimals = 2, type = FIELD_TYPE_FLOAT } Thank you, Michael Am 19.04.2005 9:32 Uhr schrieb "Michael Taubert" unter <mta...@ap...>: > Hi all, > > I tried to run the following code to query a test database and as soon as I > want to print out the description the program crash with a bus error. The > CLI_test program is crashing too when I use these login informations and the > database. > > ------------------ > Connection = [[MCPConnection alloc] initToHost:@"localhost" > withLogin: @"test" > password: @"test" > usingPort: 0]; > > if (! Connection || [Connection isConnected] == FALSE) > { > NSLog (@"Could not log into database: %@\n", [Connection > getLastErrorMessage]); > NSBeep(); > } > else > { > NSArray *Dict = nil; > MCPResult *Result = nil; > > [Connection selectDB:@"faq"]; > > if ([Connection getLastErrorID] == 0) > Result = [Connection queryString:@"select * from faqdata"]; > > if ([Connection getLastErrorID] == 0) > NSLog (@"Got: %@\n", [Result description]); > /* > * read to start queries... > */ > } > --------------- > > Any ideas? > > Thank you, > > Michael > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: New Crystal Reports XI. > Version 11 adds new functionality designed to reduce time involved in > creating, integrating, and deploying reporting solutions. Free runtime info, > new features, or free trial, at: http://www.businessobjects.com/devxi/728 > _______________________________________________ > Mysql-cocoa-users mailing list > Mys...@li... > https://lists.sourceforge.net/lists/listinfo/mysql-cocoa-users |
From: Michael T. <mta...@ap...> - 2005-04-19 07:33:03
|
Hi all, I tried to run the following code to query a test database and as soon as I want to print out the description the program crash with a bus error. The CLI_test program is crashing too when I use these login informations and the database. ------------------ Connection = [[MCPConnection alloc] initToHost:@"localhost" withLogin: @"test" password: @"test" usingPort: 0]; if (! Connection || [Connection isConnected] == FALSE) { NSLog (@"Could not log into database: %@\n", [Connection getLastErrorMessage]); NSBeep(); } else { NSArray *Dict = nil; MCPResult *Result = nil; [Connection selectDB:@"faq"]; if ([Connection getLastErrorID] == 0) Result = [Connection queryString:@"select * from faqdata"]; if ([Connection getLastErrorID] == 0) NSLog (@"Got: %@\n", [Result description]); /* * read to start queries... */ } --------------- Any ideas? Thank you, Michael |
From: Michael T. <mta...@ap...> - 2005-04-15 08:44:53
|
Hi all, I=B9ve got a problem with querying the database. Please look at the following code snippet to see what happens. ------------ Connection =3D [[MCPConnection alloc] initToHost:@"localhost" withLogin: @"test" password: @"test" usingPort: 0]; =20 if (! Connection || [Connection isConnected] =3D=3D FALSE) { NSLog (@"Could not log into database: %@\n", [Connection getLastErrorMessage]); NSBeep(); } else { NSArray *Dict =3D nil; MCPResult *Result =3D nil; =20 [Connection selectDB:@"faq"]; =20 if ([Connection getLastErrorID] =3D=3D 0) Result =3D [Connection queryString:@"select * from faqdata"]; =20 /******************** the next line causes a bus error ********************= / if (Result !=3D nil) NSLog (@"Got: %@\n", [Result description]); NSLog (@"Got: %@ - %i\n", [Connection getLastErrorMessage],[Connection getLastErrorID]); /* * read to start queries... */ } ----------------- I don=B9t know what the problem is, but as soon as I want to print out the description, the application crashes. By the way, the CLI_test application crashes too when I=B9m connecting to the database using the login above. Thank you in advance, Michael Taubert |
From: Michael T. <mta...@ap...> - 2005-04-14 12:46:19
|
Thank you! It's an easy fix and it is working now. :-) Best regards, Michael Am 14.04.2005 14:03 Uhr schrieb "simon elliston ball" unter <sb...@ox...>: > This is a problem with the MySQL server's new password storage method. > > A workaround can be found at: > http://dev.mysql.com/doc/mysql/en/old-client.html > > You could probably fix it by rebuilding the SMySQL framework linked > against a shared, newer client library too. > > Simon > > On Thu, 14 Apr 2005, Michael Taubert wrote: > >> Hi all, >> >> when I try to connect to localhost using >> >> initToHost:withLogin:password:usingPort: >> >> I always get the error message: >> >> Client does not support authentication protocol requested by server; >> consider upgrading MySQL client >> >> Any ideas about that? >> >> Thank you, >> >> Michael >> >> >> >> >> ------------------------------------------------------- >> SF email is sponsored by - The IT Product Guide >> Read honest & candid reviews on hundreds of IT Products from real users. >> Discover which products truly live up to the hype. Start reading now. >> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click >> _______________________________________________ >> Mysql-cocoa-users mailing list >> Mys...@li... >> https://lists.sourceforge.net/lists/listinfo/mysql-cocoa-users >> > |
From: Aaron J. <aj...@ed...> - 2005-04-14 12:37:03
|
You are probably running MySQL 4.1 as the server, right? The client library that SMySQL uses is 4.0.x, which uses an older authentication method that the 4.1 server by default rejects. There's a way to tell it to accept it, but I can't remember how. Check the documentation on mysql.com. Aaron On Apr 14, 2005, at 3:34 AM, Michael Taubert wrote: > Hi all, > > when I try to connect to localhost using > > initToHost:withLogin:password:usingPort: > > I always get the error message: > > Client does not support authentication protocol requested by server; > consider upgrading MySQL client > > Any ideas about that? > > Thank you, > > Michael > > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real > users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Mysql-cocoa-users mailing list > Mys...@li... > https://lists.sourceforge.net/lists/listinfo/mysql-cocoa-users > |
From: Michael T. <mta...@ap...> - 2005-04-14 08:34:44
|
Hi all, when I try to connect to localhost using initToHost:withLogin:password:usingPort: I always get the error message: Client does not support authentication protocol requested by server; consider upgrading MySQL client Any ideas about that? Thank you, Michael |
From: Zakaria A. <zar...@gm...> - 2005-03-02 12:18:21
|
Hi everyone, First of all I like to apologize for my poor English. Here's the problem. I wrote a Cocoa program for my enterprise. One of the functions is to connect to a MySql database. So I downloaded SMySql on my Mac , put the SMySql_static framework into /Library/FrameWorks Then I wrote a simple test connection. After #import <SMySql_static/SMySql_static.h> //the usual class header -(IBAction):connect_to_db:(id)sender; //.m file //lots of stuff ommited -(IBAction)connect_to_db:(id)sender { MCPConnection *theConnec = [MCPConnection alloc]; MCPResult *theRes; NSDictionary *theDict; NSArray *theColNames; int i,j; theConnec = [theConnec initToHost:@"10.0.0.165" withLogin:@"cde27" password:@"tryToGuess" usingPort:3306]; [theConnec selectDB:@"CDE"]; theRes = [theConnec queryString:@"SELECT * FROM tblPersonelInfoSociete"]; if([theConnec isConnected]) NSLog([theConnec serverInfo]); else { NSBeginAlertSheet(@"Connection Error", @"Ok", @"",@"", window,self,NULL,NULL,NULL,@"Unable to connect to 10.0.0.165"); return; } //show the sheet exit the procedure theColNames = [theRes fetchFieldsName]; i = 0; NSLog(@"Im here: the dict is %@ and Colnames are %@", theDict, theColNames); while ( theDict = [theRes fetchRowAsDictionary]){ NSLog(@"Row : d\n", i); for(j=0; j<[theColNames count]; j++){ NSLog(@" Field: %@, containt : %@\n", [theColNames objectAtIndex:j], [theDict objectForKey:[theColNames objectAtIndex:j]]); } //end of for loop i++; } //end of while } The example comes from the SMySql website It compiles perfectly but it won't connect. I always receive the alert sheet unable to connect But on CocoaMysql I can connect to db without any problem Can someone help me, did I miss something. THANKS ALOT |
From: Ruggiero, S. <ste...@ra...> - 2005-02-28 14:13:44
|
Thank you very much for the tip! I tried including the sources into my project, but I could not get it = to compile - I think it is because of the several path dependencies = between the routines that do not match when placed in a "foreign" project. So Serge Cohen - maybe you have some further ideas to solve this = problem? Any help would be great!! Best regards, Stephan -----Urspr=FCngliche Nachricht----- Von: Aaron Jacobs [mailto:aj...@ed...] Gesendet: Freitag, 25. Februar 2005 15:30 An: Stephan Ruggiero Betreff: Re: [Mysql-cocoa-users] Including SMySQL_bundled into preferences pane project What you want to do is download the source distribution for SMySQL and=20 then in your project go to Project -> Add to Project and add everything = in the SMySQL and mysql_bins directories. Then you also have to go to=20 Project -> Add to Project and press Cmd-Shift-G and type in /usr/lib to = go to that directory and add the following files: libssl.0.9.7.dylib libz.1.dylib libcrypto.0.9.7.dylib If you can't make it work that way, you may want to talk to Serge = Cohen. On Feb 25, 2005, at 8:04 AM, Stephan Ruggiero wrote: > Hi Aaron, > > it would be very nice if you could help me out with this - I've been=20 > trying around for the last 2 hours but without any success :-( Seems=20 > like I'm stucked... > > Thank you very much again! > > > Stephan > > > Am 25.02.2005 um 14:59 schrieb Aaron Jacobs: > >> Not step-by-step, no. You can probably just include all the .h and = .m >> files as well as the .a file for the MySQL library that needs to be >> linked in, but I'm not entirely sure. I'm actually going to be = doing >> something similar soon (today if I have time), so let me know if you >> can't figure it out and I'll tell you how I did it. >> >> Aaron >> >> >> On Feb 25, 2005, at 7:07 AM, Stephan Ruggiero wrote: >> >>> ok, I get the problem, thank you very much! >>> >>> Do you perhaps know the steps needed to include the source directly >>> into my project? >>> >>> >>> >>> Am 25.02.2005 um 13:37 schrieb Aaron Jacobs: >>> >>>> It's not the #import that's causing it - that's purely a compile=20 >>>> time >>>> thing. It's the fact that the pref pane is dynamically linked to=20 >>>> the >>>> framework and the dynamic linker can't find the framework when the >>>> pane >>>> >>>> is run. What you could do is include the SMySQL source directly = in >>>> your project rather than building it as a framework. That way it >> will >>>> be compiled right into your code and the linker won't have to = worry >>>> about finding the framework. >>>> >>>> Aaron >>>> >>>> >>>> >>>> On Feb 25, 2005, at 6:34 AM, Stephan Ruggiero wrote: >>>> >>>>> hmmm... >>>>> that's exactly what I wanted to avoid - I pretty much prefer the >>>>> drag'n'drop installations :-) >>>>> maybe there is a special way to spell the #import command to tell >> the >>>> >>>>> system where to look for the framework? >>>>> >>>>> >>>>> Am 25.02.2005 um 13:30 schrieb Aaron Jacobs: >>>>> >>>>>> Stephan, >>>>>> >>>>>> Perhaps if you copy the framework into ~/Library/Frameworks or >>>>>> /Library/Frameworks it will work. This may mean that you have = to >>>>>> create >>>>>> an installer program for your pref pane, though. >>>>>> >>>>>> Aaron Jacobs >>>>>> >>>>>> >>>>>> >>>>>> On Feb 25, 2005, at 3:01 AM, Stephan Ruggiero wrote: >>>>>> >>>>>> >>>>>>> Hello list, >>>>>>> >>>>>>> i want to include the bundled version of SMySQL into a = preference >>>>>>> pane >>>>>>> I am currently developing. I did everything linke D.Winter >>>>>>> explained >>>>>>> in his pdf (thanks a lot) to copy the framework to my target. I >>>>>>> then >>>>>>> included the framework in my main classes ".h" like this: >>>>>>> #import <SMySQL_bundled/SMySQL_bundled.h> >>>>>>> >>>>>>> When starting the SystemPreferences app, my pane plugin ca not = be >>>>>>> loaded, this error is being displayed in the console log: >>>>>>> >>>>>>> ******** >>>>>>> 2005-02-25 09:37:01.317 System Preferences[2027] *** -[NSBundle >>>>>>> load]: >>>>>>> Error loading code >>>>>>> /Library/PreferencePanes/DKON.prefPane/Contents/MacOS/DKON for >>>> bundle >>>>>>> /Library/PreferencePanes/DKON.prefPane, error code 0 (link edit >>>> error >>>>>>> code 0, error number 2 (dyld: /Applications/System >>>>>>> Preferences.app/Contents/MacOS/System Preferences can't open >>>> library: >>>>>>> >> @executable_path/../Frameworks/SMySQL_bundled.framework/Versions/A/ >>>>>>> SMy >>>>>>> SQL_bundled (No such file or directory, errno =3D 2) >>>>>>> ******** >>>>>>> >>>>>>> It seems the SystemPreferences app does not search the SMySQL >>>>>>> framework within my ".prefpane" bundle - it is only looking = into >>>>>>> his >>>>>>> own bundle! >>>>>>> >>>>>>> Can someone assist me with this problem? >>>>>>> >>>>>>> Thank you very much! >>>>>>> >>>>>>> S. Ruggiero >>>>>>> >>>>>>> >>>>> >>> > |
From: Lorenz T. <lo...@te...> - 2005-02-26 07:16:48
|
Hi Serge, A version supporting MySQL 4.1 would be great! The link to the modified version of CocoaMySQL is=20 http://www.theonline.org/cocoamysql/ The person who did this version wrote me the following about how to=20 build the modified framework: "I started off grabbing the latest 4.1 install package off of the mysql=20= site and installed that. =46rom there I got the latest SMySQL framework=20= source. In that project opened in xcode I removed all the included=20 mysql libs and headers and instead pointed/linked them over to the 4.1=20= version installed now in /usr/local/mysql. One thing I did have to do=20 to make it actually compile was define the MYSQL_CHARSET. The 4.1 mysql=20= headers did not have a default charset defined, so I just tossed it in=20= as "latin1" into one of the SMySQL header files. =46rom there I just=20 built the framework in xcode then copied it over/into the CocoaMySQL=20 project. It seemed to work, so I went with it." I received the following problems with the modified framework: - "my varchar and text fields are all in unicode (ucs2 or utf8). there=20= was a problem with utf-8 display (some strings are fine but most are=20 truncated or set to null by cocoamysql.). I hacked around a little bit=20= and found the problem (NSData to CString to NSString can not handle=20 double-byte unicode when the first bye is x00), patched it, but=20 couldn't get it to compile on my machine (libsqlclient version=20 problem). before i gave up I found out that if you send a 'set names utf8' query=20= to mysql then everything just works. so it became my favorite custom=20 query string. maybe you can hardwire this into the program when utf-8=20 client encoding is selected." - "I tried the user modified version of CocoaMySQL. I could indeed log=20= into MySQL 4.1 server using it. However, all my data in Korean=20 (encoded as UTF-8) were shown as ????. So I guess there is a bug with=20= character encoding/decoding in this specific version. Normally, I use original version of CocoaMySQL with MySQL Server 4.1=20 (with user password hashed with OLD_PASSWORD() function). Under this=20 setting, character encoding/decoding works perfectly both with UTF-8=20 and EUC-KR. However, I had difficulties with UTF-16 encoding. Is this=20= a known issue?" Best Regards, Lorenz On 24. Feb 2005, at 07:56,=20 mys...@li... wrote: > Hi Scott;=3D0D > =3D0D > I'm away, not being able to spend much time on SMySQL... have to=20 > answer =3D0D=3D > > a couple of late questions as well.=3D0D > To keep it short, I'm working on a big improvement of SMySQL, among = =3D0D > other thing it will use the new library libmysqlclient so it will be=20= > =3D0D > able to connect to 4.1/5.0.=3D0D > It will also include a 'MCPEntrepriseKit' doing relation/object =3D0D > modelling.=3D0D > =3D0D > Serge.=3D0D > =3D0D > PS: I kind of remembered some one sending me a pointer to a version of=20= > =3D0D=3D > > CocoaMySQL which contains a binary of the framework using the new =3D0D > library, hence working OK with server version 4.1/5.0... but can not=20= > =3D0D > find the link anymore.=3D0D > PPS: I'll try to answer all question for which I'm late, as soon as I=20= > =3D0D=3D > > get a bit of time.=3D0D --=20 lorenz textor ** sh ** eigerstrasse 21 8200 schaffhausen tf 052 - 624 27 91 ** zh ** schimmelstrasse 5 8003 z=FCrich tf 043 - 333 00 19 ** mobile 076 - 531 71 74 email lo...@te... |
From: Aaron J. <aj...@ed...> - 2005-02-25 12:30:09
|
Stephan, Perhaps if you copy the framework into ~/Library/Frameworks or /Library/Frameworks it will work. This may mean that you have to create an installer program for your pref pane, though. Aaron Jacobs On Feb 25, 2005, at 3:01 AM, Stephan Ruggiero wrote: > Hello list, > > i want to include the bundled version of SMySQL into a preference pane > I am currently developing. I did everything linke D.Winter explained > in his pdf (thanks a lot) to copy the framework to my target. I then > included the framework in my main classes ".h" like this: > #import <SMySQL_bundled/SMySQL_bundled.h> > > When starting the SystemPreferences app, my pane plugin ca not be > loaded, this error is being displayed in the console log: > > ******** > 2005-02-25 09:37:01.317 System Preferences[2027] *** -[NSBundle load]: > Error loading code > /Library/PreferencePanes/DKON.prefPane/Contents/MacOS/DKON for bundle > /Library/PreferencePanes/DKON.prefPane, error code 0 (link edit error > code 0, error number 2 (dyld: /Applications/System > Preferences.app/Contents/MacOS/System Preferences can't open library: > @executable_path/../Frameworks/SMySQL_bundled.framework/Versions/A/ > SMySQL_bundled (No such file or directory, errno = 2) > ******** > > It seems the SystemPreferences app does not search the SMySQL > framework within my ".prefpane" bundle - it is only looking into his > own bundle! > > Can someone assist me with this problem? > > Thank you very much! > > S. Ruggiero > |
From: Stephan R. <ste...@ra...> - 2005-02-25 09:01:07
|
Hello list, i want to include the bundled version of SMySQL into a preference pane I am currently developing. I did everything linke D.Winter explained in his pdf (thanks a lot) to copy the framework to my target. I then included the framework in my main classes ".h" like this: #import <SMySQL_bundled/SMySQL_bundled.h> When starting the SystemPreferences app, my pane plugin ca not be loaded, this error is being displayed in the console log: ******** 2005-02-25 09:37:01.317 System Preferences[2027] *** -[NSBundle load]: Error loading code /Library/PreferencePanes/DKON.prefPane/Contents/MacOS/DKON for bundle /Library/PreferencePanes/DKON.prefPane, error code 0 (link edit error code 0, error number 2 (dyld: /Applications/System Preferences.app/Contents/MacOS/System Preferences can't open library: @executable_path/../Frameworks/SMySQL_bundled.framework/Versions/A/ SMySQL_bundled (No such file or directory, errno = 2) ******** It seems the SystemPreferences app does not search the SMySQL framework within my ".prefpane" bundle - it is only looking into his own bundle! Can someone assist me with this problem? Thank you very much! S. Ruggiero |
From: Serge C. <ser...@us...> - 2005-02-24 06:35:46
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 =0D Hi Scott;=0D =0D I'm away, not being able to spend much time on SMySQL... have to answer =0D= a couple of late questions as well.=0D To keep it short, I'm working on a big improvement of SMySQL, among =0D other thing it will use the new library libmysqlclient so it will be =0D able to connect to 4.1/5.0.=0D It will also include a 'MCPEntrepriseKit' doing relation/object =0D modelling.=0D =0D Serge.=0D =0D PS: I kind of remembered some one sending me a pointer to a version of =0D= CocoaMySQL which contains a binary of the framework using the new =0D library, hence working OK with server version 4.1/5.0... but can not =0D find the link anymore.=0D PPS: I'll try to answer all question for which I'm late, as soon as I =0D= get a bit of time.=0D =0D Le 24 f=E9vr. 05, =E0 00:42, Scott Ellsworth a =E9crit :=0D =0D > Hello.=0D >=0D > I am quite impressed - it appears that much of the functionality I =0D > really appreciated in CocoaMySql is actually coming from your SMySQL =0D= > framework deep down.=0D >=0D > According to the developer of CocoaMySql, his program is unable to =0D > connect to MySql servers running version 4.1 or 5.0 because of =0D > authentication changes not currently handled in SMySQL. This was, of =0D= > course, no big deal when MySql 4.0.x was the recommended version, but =0D= > now that 4.1 is the version they recommend, it would be quite keen if =0D= > I could use my favorite Cocoa tool to talk to it.=0D >=0D > Any thoughts on when the work will be complete?=0D >=0D > Scott=0D >=0D >=0D *******************************************=0D Serge Cohen=0D =0D GPG Key ID: 9CBB58FB=0D *******************************************=0D =0D -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (Darwin) iD8DBQFCHXW45EPeG5y7WPsRAsQ8AJ4rAoa3YCgXWjGefEHwe+EUOcInvwCgtfM5 Kh9sPm85AfI8BIBT7K7vjVE=3D =3D83Qg -----END PGP SIGNATURE----- |
From: Aaron J. <aj...@ed...> - 2005-02-23 22:55:11
|
John, There's a VERY simple description of how to connect and do queries in the API documentation here: http://mysql-cocoa.sourceforge.net/SMySQL_doc/MCPConnection.html Then there's a description of how to use MCPResult here: http://mysql-cocoa.sourceforge.net/SMySQL_doc/MCPResult.html I think there's also a CLI_test program that comes with the framework. Aaron Jacobs On Feb 23, 2005, at 4:49 PM, John Mistler wrote: > I didn't get any responses from the previous post, so I'll assume that > I was > asking too much. Alternatively, could someone be so kind as to point > me to > an XCode example project that uses the SMySQL Framework to bridge a > MySQL > table and a visual representation of that table? I just need to get > an idea > of how the methods of the framework are utilized in .h and .m files. > > Thanks, > > John > > Previous Post: > > I am trying to integrate some Obj-C into my XCode app, which is > currently > exclusively written in Applescript. I use a MySQL database to supply > the > app with data for outlines and tables. With applescript I use the > following > to return a matrix of database entries: > > set theData to do shell script "/usr/local/mysql/bin/mysql -h > localhost -u > theUser -pthePassword -D 'theDatabase' -N -e \"SELECT columnOne, > columnTwo, > columnThree FROM theTable WHERE columnFour = '"&aVariable&"'\"" > > I then use applescript's text item delimiters to convert the matrix > into a > list of lists. > > Could someone give me an idea where to start, using the SMySQL > framework, in > issuing the same query in Obj-C? Some questions: > > 1. I am not sure I understand which header file(s) I need to #import > at the > top of my populateOutline.m file, if any? > > 2. Do I need to be using methods in the "MCPConnection.m" file to first > connect to the database, or is that taken care of some other way? If > "yes", > then do I call that/those method(s) each time I issue a query? > > 3. How do I know if the matrix I am returning is an NSDictionary or > NSArray...and how do choose the proper method out of the plethora in > "MPCFastQueries.m" and "MPCResult.m" that will return the same list of > lists > as in the applescript example? > > I know there is a lot I am asking here, but if I could get guidance on > these > issues then I will be able to use deductive reasoning to solve the > rest of > my issues in the future... > > Thanks! > > -John Mistler > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real > users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Mysql-cocoa-users mailing list > Mys...@li... > https://lists.sourceforge.net/lists/listinfo/mysql-cocoa-users > |
From: John M. <joh...@ad...> - 2005-02-23 22:49:59
|
I didn't get any responses from the previous post, so I'll assume that I was asking too much. Alternatively, could someone be so kind as to point me to an XCode example project that uses the SMySQL Framework to bridge a MySQL table and a visual representation of that table? I just need to get an idea of how the methods of the framework are utilized in .h and .m files. Thanks, John Previous Post: I am trying to integrate some Obj-C into my XCode app, which is currently exclusively written in Applescript. I use a MySQL database to supply the app with data for outlines and tables. With applescript I use the following to return a matrix of database entries: set theData to do shell script "/usr/local/mysql/bin/mysql -h localhost -u theUser -pthePassword -D 'theDatabase' -N -e \"SELECT columnOne, columnTwo, columnThree FROM theTable WHERE columnFour = '"&aVariable&"'\"" I then use applescript's text item delimiters to convert the matrix into a list of lists. Could someone give me an idea where to start, using the SMySQL framework, in issuing the same query in Obj-C? Some questions: 1. I am not sure I understand which header file(s) I need to #import at the top of my populateOutline.m file, if any? 2. Do I need to be using methods in the "MCPConnection.m" file to first connect to the database, or is that taken care of some other way? If "yes", then do I call that/those method(s) each time I issue a query? 3. How do I know if the matrix I am returning is an NSDictionary or NSArray...and how do choose the proper method out of the plethora in "MPCFastQueries.m" and "MPCResult.m" that will return the same list of lists as in the applescript example? I know there is a lot I am asking here, but if I could get guidance on these issues then I will be able to use deductive reasoning to solve the rest of my issues in the future... Thanks! -John Mistler |
From: John M. <joh...@ad...> - 2005-02-23 07:44:40
|
I am trying to integrate some Obj-C into my XCode app, which is currently exclusively written in Applescript. I use a MySQL database to supply the app with data for outlines and tables. With applescript I use the following to return a matrix of database entries: set theData to do shell script "/usr/local/mysql/bin/mysql -h localhost -u theUser -pthePassword -D 'theDatabase' -N -e \"SELECT columnOne, columnTwo, columnThree FROM theTable WHERE columnFour = '"&aVariable&"'\"" I then use applescript's text item delimiters to convert the matrix into a list of lists. Could someone give me an idea where to start, using the SMySQL framework, in issuing the same query in Obj-C? Some questions: 1. I am not sure I understand which header file(s) I need to #import at the top of my populateOutline.m file, if any? 2. Do I need to be using methods in the "MCPConnection.m" file to first connect to the database, or is that taken care of some other way? If "yes", then do I call that/those method(s) each time I issue a query? 3. How do I know if the matrix I am returning is an NSDictionary or NSArray...and how do choose the proper method out of the plethora in "MPCFastQueries.m" and "MPCResult.m" that will return the same list of lists as in the applescript example? I know there is a lot I am asking here, but if I could get guidance on these issues then I will be able to use deductive reasoning to solve the rest of my issues in the future... Thanks! -John Mistler |
From: John M. <joh...@ad...> - 2005-02-23 04:26:59
|
I knew it was some embarrassing issue like that. Thanks! -John on 2/22/05 7:22 PM, Aaron Jacobs at aj...@ed... wrote: > John, > > You are attempting to build the project right inside of its read-only > DMG. Copy the contents of the disk image to a folder on your hard > drive first. > > Aaron Jacobs > > > > On Feb 22, 2005, at 8:13 PM, John Mistler wrote: > >> I need some serious newbie help...having no experience in adding >> frameworks >> to an XCode App. I have downloaded the OSX SMySQL-src.2.3.1 dmg. and >> opened >> the SMySQL.pbproj in XCode. My intent is to add the bundled version of >> SMySQL to my XCode app. I assume that I have to build the bundled >> version >> before attempting to add it to my app, so I "clean all targets" and >> attempt >> to build the SMySQL_bundled target. After getting an unexpected >> "Unable to >> Save Project--this project might be locked or might not be writable" >> message, the build process fails with 3 errors: >> >> Missing file or directory: >> /Volumes/SMySQL_src_2.3.1/build/SMySQL.build/SMySQL.build/info.plist >> Missing file or directory: >> /Volumes/SMySQL_src_2.3.1/build/SMySQL.build/SMySQL.build/ >> pbdevelopment.plis >> t >> Missing file or directory: >> /Volumes/SMySQL_src_2.3.1/build/SMySQL.build/SMySQL.build/BPTag005- >> script.sh >> >> Am I going about this the wrong way, and/or is there something wrong >> with my >> SMySQL project? I have tried downloading a new one, but with the same >> outcome. >> >> Thanks for any insight, >> >> John Mistler >> >> >> >> ------------------------------------------------------- >> SF email is sponsored by - The IT Product Guide >> Read honest & candid reviews on hundreds of IT Products from real >> users. >> Discover which products truly live up to the hype. Start reading now. >> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click >> _______________________________________________ >> Mysql-cocoa-users mailing list >> Mys...@li... >> https://lists.sourceforge.net/lists/listinfo/mysql-cocoa-users >> > |
From: Aaron J. <aj...@ed...> - 2005-02-23 03:22:46
|
John, You are attempting to build the project right inside of its read-only DMG. Copy the contents of the disk image to a folder on your hard drive first. Aaron Jacobs On Feb 22, 2005, at 8:13 PM, John Mistler wrote: > I need some serious newbie help...having no experience in adding > frameworks > to an XCode App. I have downloaded the OSX SMySQL-src.2.3.1 dmg. and > opened > the SMySQL.pbproj in XCode. My intent is to add the bundled version of > SMySQL to my XCode app. I assume that I have to build the bundled > version > before attempting to add it to my app, so I "clean all targets" and > attempt > to build the SMySQL_bundled target. After getting an unexpected > "Unable to > Save Project--this project might be locked or might not be writable" > message, the build process fails with 3 errors: > > Missing file or directory: > /Volumes/SMySQL_src_2.3.1/build/SMySQL.build/SMySQL.build/info.plist > Missing file or directory: > /Volumes/SMySQL_src_2.3.1/build/SMySQL.build/SMySQL.build/ > pbdevelopment.plis > t > Missing file or directory: > /Volumes/SMySQL_src_2.3.1/build/SMySQL.build/SMySQL.build/BPTag005- > script.sh > > Am I going about this the wrong way, and/or is there something wrong > with my > SMySQL project? I have tried downloading a new one, but with the same > outcome. > > Thanks for any insight, > > John Mistler > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real > users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Mysql-cocoa-users mailing list > Mys...@li... > https://lists.sourceforge.net/lists/listinfo/mysql-cocoa-users > |
From: John M. <joh...@ad...> - 2005-02-23 02:14:00
|
I need some serious newbie help...having no experience in adding frameworks to an XCode App. I have downloaded the OSX SMySQL-src.2.3.1 dmg. and opened the SMySQL.pbproj in XCode. My intent is to add the bundled version of SMySQL to my XCode app. I assume that I have to build the bundled version before attempting to add it to my app, so I "clean all targets" and attempt to build the SMySQL_bundled target. After getting an unexpected "Unable to Save Project--this project might be locked or might not be writable" message, the build process fails with 3 errors: Missing file or directory: /Volumes/SMySQL_src_2.3.1/build/SMySQL.build/SMySQL.build/info.plist Missing file or directory: /Volumes/SMySQL_src_2.3.1/build/SMySQL.build/SMySQL.build/pbdevelopment.plis t Missing file or directory: /Volumes/SMySQL_src_2.3.1/build/SMySQL.build/SMySQL.build/BPTag005-script.sh Am I going about this the wrong way, and/or is there something wrong with my SMySQL project? I have tried downloading a new one, but with the same outcome. Thanks for any insight, John Mistler |
From: Qingping T. <qp...@ya...> - 2005-01-08 02:23:27
|
Hi, Serge I have been using your SMySql framework for a while. This framework is great. But I just found there are two memory leaks in the framework(2.3.1). 1. In MCPNumber, the dealloc() function doesn't call [super dealloc]. So the object is not released. 2. In MCPConnection, the queryString() function doesn't release theResult when returning nil. Hope these would help improving the framework. Thank you for creating this project. Qingping Tao __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo |
From: Ing. M. K. <ma...@ce...> - 2004-12-14 11:27:29
|
Hi all I've tried to run SMySQL on Solaris 8 x86. I got no problems with compilation, but probably i got wrong output from CLI_test. I'm using mysql server 3.23.43 libmysqlclient 4.1.7 Can anybody help me? The output is in attachment. Thanx a lot. |
From: Ing. M. K. <ma...@ce...> - 2004-12-14 11:21:37
|
Hi all I've tried to run SMySQL on Solaris 8 x86. I got no problems with compilation, but probably i got wrong output from CLI_test. I'm using mysql server 3.23.43 libmysqlclient 4.1.7 Can anybody help me? The output is in attachment. Thanx a lot. |
From: Jim H. <che...@ho...> - 2004-11-21 20:57:34
|
Thanks, Serge! You are right, I was using retain needlessly. I was forgetting that the retain counter is already at 1. The difference between class and instance methods was indeed my main problem also. Here's another question that's related. When I use the prepareString: method on a string that contains a hyphen, it exceptions and quits. When I remove the prepareStrings it works fine. It only seems to happen on this one particular case where the string contains two words seprated by hyphen. Example: "jwisen-ap1g1r2" Is there something in the prepareString method that would be causing this, or am I doing something else wrong? (This string would be among the strings I used in my example before.) Thanks again, -JH >From: Serge Cohen <ser...@us...> >To: "Jim Hall" <che...@ho...> >CC: mys...@li... >Subject: Re: [Mysql-cocoa-users] prepareString and quoteObject (solution) >Date: Wed, 17 Nov 2004 11:37:31 +0100 > >-----BEGIN PGP SIGNED MESSAGE----- >Hash: SHA1 > >Hi Jim; > >Sorry not ot have answered before... anyway you got a correct answer from >another user of the list (difference between class and instance methods). >If I'm sending this reply it is because I think there is something wrong >in the code snippet you send to the list : > >>MCPConnection *aQueryConnection = [[[MCPConnection alloc] init] retain]; > >An object which is just alloc then init does NOT need to be retained >because it's retain count is already set to 1, so unless you're trying to >do something unusual you would just not need to call the 'retain' method. > >For more information on how to use alloc, init, retain, release and >autorelease a very good reference is Apple documentation : >http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/ >index.html >http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaObjects/ >index.html > >Hope this will help you... > >Serge. > >Le 17 nov. 04, à 00:51, Jim Hall a écrit : > >>I figured it out! (duh, it should have been obvious) >> >>For those of you searching the archives with a similar problem, try using >>it like this: >> >>MCPConnection *aQueryConnection = [[[MCPConnection alloc] init] retain]; >>MCPConnection *aQueryResult; >>aQueryResult = [aQueryConnection queryString:[NSString >>stringWithFormat:@"insert into table (fieldA,fieldB) values ( '%@', >>'%@')", >>[aQueryConnection prepareString:fieldAString], >>[aQueryConnection prepareString:fieldAString]]]; >> >>Thanks! >>-JH > >******************************************* >Serge Cohen > >GPG Key ID: 9CBB58FB >******************************************* >-----BEGIN PGP SIGNATURE----- >Version: GnuPG v1.2.3 (Darwin) > >iD8DBQFBmynx5EPeG5y7WPsRAh7fAJ4x3jVWGh12THNfqNkd5/lGIiepVgCdFkMV >3H0Z8jTuHmXTs2FWpBIJFk0= >=CASA >-----END PGP SIGNATURE----- > |
From: Serge C. <ser...@us...> - 2004-11-17 10:38:22
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Jim;=0D =0D Sorry not ot have answered before... anyway you got a correct answer =0D= from another user of the list (difference between class and instance =0D= methods).=0D If I'm sending this reply it is because I think there is something =0D wrong in the code snippet you send to the list :=0D =0D > MCPConnection *aQueryConnection =3D [[[MCPConnection alloc] init] =0D > retain];=0D =0D An object which is just alloc then init does NOT need to be retained =0D= because it's retain count is already set to 1, so unless you're trying =0D= to do something unusual you would just not need to call the 'retain' =0D= method.=0D =0D For more information on how to use alloc, init, retain, release and =0D autorelease a very good reference is Apple documentation :=0D http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/ =0D= index.html=0D http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaObjects/ =0D= index.html=0D =0D Hope this will help you...=0D =0D Serge.=0D =0D Le 17 nov. 04, =E0 00:51, Jim Hall a =E9crit :=0D =0D > I figured it out! (duh, it should have been obvious)=0D >=0D > For those of you searching the archives with a similar problem, try =0D= > using it like this:=0D >=0D > MCPConnection *aQueryConnection =3D [[[MCPConnection alloc] init] =0D > retain];=0D > MCPConnection *aQueryResult;=0D > aQueryResult =3D [aQueryConnection queryString:[NSString =0D > stringWithFormat:@"insert into table (fieldA,fieldB) values ( '%@', =0D= > '%@')",=0D > [aQueryConnection prepareString:fieldAString],=0D > [aQueryConnection prepareString:fieldAString]]];=0D >=0D > Thanks!=0D > -JH=0D =0D *******************************************=0D Serge Cohen=0D =0D GPG Key ID: 9CBB58FB=0D ******************************************* -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (Darwin) iD8DBQFBmynx5EPeG5y7WPsRAh7fAJ4x3jVWGh12THNfqNkd5/lGIiepVgCdFkMV 3H0Z8jTuHmXTs2FWpBIJFk0=3D =3DCASA -----END PGP SIGNATURE----- |
From: Jim H. <che...@ho...> - 2004-11-16 23:52:12
|
I figured it out! (duh, it should have been obvious) For those of you searching the archives with a similar problem, try using it like this: MCPConnection *aQueryConnection = [[[MCPConnection alloc] init] retain]; MCPConnection *aQueryResult; aQueryResult = [aQueryConnection queryString:[NSString stringWithFormat:@"insert into table (fieldA,fieldB) values ( '%@', '%@')", [aQueryConnection prepareString:fieldAString], [aQueryConnection prepareString:fieldAString]]]; Thanks! -JH |
From: Jim H. <che...@ho...> - 2004-11-16 20:42:11
|
I know hotmail sucks monkey balls, but I am forced into using it. Unfortunately, it doesn't display correctly in Mozilla for the Mac. Therefore, I was unable to see anything that I was typing in my last post. Now that I have access to a PC w/ IE, *ack* I can actually read what I'm trying to say... As I perused through the list archives, it became abundantly clear to me that other people seem to be having great success with the "prepareString:" and "quoteObject:" methods. I, on the other hand, seem to be missing out on all of the fun, as I can't seem to get the MCPConnection class to respond to the method. In fact, if I turn on code completion, the IDE only makes these methods available when used in conjunction with the MCPResult class. However, at compile time, I still get the message that "MCPResult may not respond to + prepareString:". (Just for fun, I tried replacing MCPResult with MCPConnection, MCPDocument, & NSString, only to be dissapointed everytime.) Here is my syntax: NSString *aStringVariable; aStringVariable = [MCPConnection prepareString:aStringVariable]; This seems like how it *should* work to me, but I must not understand this correctly. Am I not overriding something properly here? I get the same results with either method. Everything else I am doing with SMySQL works great! Fantastic job! -JH |