mysql-cocoa-users Mailing List for MySQL Objective C API for Cocoa (Page 5)
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: Aaron J. <aj...@ed...> - 2004-11-15 22:36:09
|
- quoteObject: is an instance method, not a class method. So you'd send it to an init'd instance of MCPConnection, not to MCPConnection itself. Aaron On Nov 15, 2004, at 4:29 PM, Jim Hall wrote: > XCode keeps saying that MCPConnection doesnt respond to quoteObject. > > Has anyone actually seen this method work? If so, what is the proper > syntax? > > A brief snippet will do, I just need to see how to call it. > > i.e. [MCPConnection quoteObject:stringOfText]; // Which doesn't work. > > Thanks, > JH > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: InterSystems CACHE > FREE OODBMS DOWNLOAD - A multidimensional database that combines > robust object and relational technologies, making it a perfect match > for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8 > _______________________________________________ > Mysql-cocoa-users mailing list > Mys...@li... > https://lists.sourceforge.net/lists/listinfo/mysql-cocoa-users > |
From: Jim H. <che...@ho...> - 2004-11-15 22:31:31
|
XCode keeps saying that MCPConnection doesnt respond to quoteObject. Has anyone actually seen this method work? If so, what is the proper syntax? A brief snippet will do, I just need to see how to call it. i.e. [MCPConnection quoteObject:stringOfText]; // Which doesn't work. Thanks, JH |
From: Aaron J. <aj...@ed...> - 2004-09-07 13:36:20
|
Last thing, I swear! (Sorry, I keep forgetting stuff.) I should also mention that when I linked against the fink version of the library it gave me a much smaller framework - for the bundled version it was 408 KB versus 1.5 MB. That was a nice bonus. Aaron On Sep 7, 2004, at 8:28 AM, Aaron Jacobs wrote: > Oh, I forgot to mention that to do this I had to build a custom > version of SMySQL that included libmysql's errmsg.h header file. It > would probably be a good idea to do this in the main distribution so > that you can test against various errors returned from getLastErrorID. > > While we're talking about that, I also wondered why the version of > libmysqlcient linked against by SMySQL is so old (4.0.14) as well as > its headers, which mention server version 4.0.5. I linked against > fink's version (4.0.17) and that worked great. > > Aaron > |
From: Aaron J. <aj...@ed...> - 2004-09-07 13:28:27
|
Oh, I forgot to mention that to do this I had to build a custom version of SMySQL that included libmysql's errmsg.h header file. It would probably be a good idea to do this in the main distribution so that you can test against various errors returned from getLastErrorID. While we're talking about that, I also wondered why the version of libmysqlcient linked against by SMySQL is so old (4.0.14) as well as its headers, which mention server version 4.0.5. I linked against fink's version (4.0.17) and that worked great. Aaron On Sep 7, 2004, at 8:24 AM, Aaron Jacobs wrote: > Serge, > > That's fair enough - you're right about the data encapsulation aspect. > In fact, I wasn't able to get the reconnect parameter to work at all > - for some reason it would work when I linked directly against > libmysqlclient, but not when I used SMySQL, even if I put the proper > setting right in the SMySQL code and built SMySQL myself with the same > version of libmysqlclient that worked on its own. I'm still not sure > why this is, but for future reference (in case anybody else needs it) > here is what I did. I just made a category on MCPConnection with one > extra function: > > - (MCPResult *)queryStringWithoutReconnect:(NSString *)query > { > static BOOL disconnected = NO; > > if (disconnected) > { > NSLog(@"Connection disconnected!"); > return nil; > } > > MCPResult *result = [self queryString:query]; > > if (([self getLastErrorID] == CR_SERVER_GONE_ERROR) || ([self > getLastErrorID] == CR_SERVER_LOST)) > { > NSLog(@"Connection disconnected!"); > disconnected = YES; > } > > return result; > } > > > There are definitely more elegant ways to do this, but all I needed > for my particular application was for no more queries to happen under > any circumstances once the connection was lost. > > Serge, you might consider making a method that allows you to set the > reconnect option and then use code similar to the above in the > queryString: method to make sure that a reconnect doesn't occur if not > desired. The reason that this is a big deal is that when > libmysqlclient reconnects it loses any session variables you had set > and, more importantly, it loses locks and transactions that the > application will not be aware are gone. > > Aaron > > > > On Sep 6, 2004, at 4:21 PM, Serge Cohen wrote: > >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> Hi Aaron; >> >> Indeed I'd rather not provide the pointer to the connection >> directly... just because this breaks the object concept and if some >> one deadly needs it, the derivation solution (that you use) is still >> there. >> Instead I can propose to have an interface to set this kind of >> parameters directly from the object. >> I have to check exactly what should be 'settable' and which interface >> will be correct with that (trying to avoid having too many functions >> for that, maybe some kind of -setParameter:forKey: message). >> >> If other users are similar requirements or have preferences >> concerning the interface to these kind of setting, please answer (to >> the list so - - -if necessary- we can have a discution on that). >> >> Serge. >> >> PS: Aaron, sorry I sent you the mail from a wrong mail account, >> please if you answer me use the sourceforge mail account, and don't >> reply directly to the previous mail. Thanks. >> >> Le 4 sept. 04, à 03:47, Aaron Jacobs a écrit : >> >>> I've run across a situation where it would be very unfortunate for >>> my application to automatically and silently re-establish its >>> connection to the MySQL server if it is lost. The only way I've >>> found to disable this behavior is to set the 'reconnect' member of >>> the MYSQL structure to zero, rather than the default of one. So >>> what I need is a method in MCPConnection that simply returns >>> mConnection so that I can set the flag. For now I'll make a >>> subclass of MCPConnection since mConnection is protected, but Serge >>> do you think it would be possible to get such a method officially >>> supported? >>> >>> Thanks, >>> Aaron >>> >> ******************************************* >> Serge Cohen >> >> GPG Key ID: 9CBB58FB >> ******************************************* >> >> -----BEGIN PGP SIGNATURE----- >> Version: GnuPG v1.2.3 (Darwin) >> >> iD8DBQFBPNTy5EPeG5y7WPsRAtTMAJ94ccaejFmam0EZIit++eoYd9mWTQCgkAKs >> 26hTqH7QqWdTFQGyIO8bZ34= >> =IARO >> -----END PGP SIGNATURE----- >> >> >> >> ------------------------------------------------------- >> This SF.Net email is sponsored by BEA Weblogic Workshop >> FREE Java Enterprise J2EE developer tools! >> Get your free copy of BEA WebLogic Workshop 8.1 today. >> http://ads.osdn.com/?ad_idP47&alloc_id808&op=click >> _______________________________________________ >> Mysql-cocoa-users mailing list >> Mys...@li... >> https://lists.sourceforge.net/lists/listinfo/mysql-cocoa-users |
From: Aaron J. <aj...@ed...> - 2004-09-07 13:24:27
|
Serge, That's fair enough - you're right about the data encapsulation aspect. In fact, I wasn't able to get the reconnect parameter to work at all - for some reason it would work when I linked directly against libmysqlclient, but not when I used SMySQL, even if I put the proper setting right in the SMySQL code and built SMySQL myself with the same version of libmysqlclient that worked on its own. I'm still not sure why this is, but for future reference (in case anybody else needs it) here is what I did. I just made a category on MCPConnection with one extra function: - (MCPResult *)queryStringWithoutReconnect:(NSString *)query { static BOOL disconnected = NO; if (disconnected) { NSLog(@"Connection disconnected!"); return nil; } MCPResult *result = [self queryString:query]; if (([self getLastErrorID] == CR_SERVER_GONE_ERROR) || ([self getLastErrorID] == CR_SERVER_LOST)) { NSLog(@"Connection disconnected!"); disconnected = YES; } return result; } There are definitely more elegant ways to do this, but all I needed for my particular application was for no more queries to happen under any circumstances once the connection was lost. Serge, you might consider making a method that allows you to set the reconnect option and then use code similar to the above in the queryString: method to make sure that a reconnect doesn't occur if not desired. The reason that this is a big deal is that when libmysqlclient reconnects it loses any session variables you had set and, more importantly, it loses locks and transactions that the application will not be aware are gone. Aaron On Sep 6, 2004, at 4:21 PM, Serge Cohen wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi Aaron; > > Indeed I'd rather not provide the pointer to the connection > directly... just because this breaks the object concept and if some > one deadly needs it, the derivation solution (that you use) is still > there. > Instead I can propose to have an interface to set this kind of > parameters directly from the object. > I have to check exactly what should be 'settable' and which interface > will be correct with that (trying to avoid having too many functions > for that, maybe some kind of -setParameter:forKey: message). > > If other users are similar requirements or have preferences concerning > the interface to these kind of setting, please answer (to the list so > - - -if necessary- we can have a discution on that). > > Serge. > > PS: Aaron, sorry I sent you the mail from a wrong mail account, please > if you answer me use the sourceforge mail account, and don't reply > directly to the previous mail. Thanks. > > Le 4 sept. 04, à 03:47, Aaron Jacobs a écrit : > >> I've run across a situation where it would be very unfortunate for my >> application to automatically and silently re-establish its connection >> to the MySQL server if it is lost. The only way I've found to >> disable this behavior is to set the 'reconnect' member of the MYSQL >> structure to zero, rather than the default of one. So what I need is >> a method in MCPConnection that simply returns mConnection so that I >> can set the flag. For now I'll make a subclass of MCPConnection >> since mConnection is protected, but Serge do you think it would be >> possible to get such a method officially supported? >> >> Thanks, >> Aaron >> > ******************************************* > Serge Cohen > > GPG Key ID: 9CBB58FB > ******************************************* > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.2.3 (Darwin) > > iD8DBQFBPNTy5EPeG5y7WPsRAtTMAJ94ccaejFmam0EZIit++eoYd9mWTQCgkAKs > 26hTqH7QqWdTFQGyIO8bZ34= > =IARO > -----END PGP SIGNATURE----- > > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_idP47&alloc_id808&op=click > _______________________________________________ > Mysql-cocoa-users mailing list > Mys...@li... > https://lists.sourceforge.net/lists/listinfo/mysql-cocoa-users |
From: Serge C. <ser...@us...> - 2004-09-06 21:22:04
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Aaron;=0D =0D Indeed I'd rather not provide the pointer to the connection directly... =0D= just because this breaks the object concept and if some one deadly =0D needs it, the derivation solution (that you use) is still there.=0D Instead I can propose to have an interface to set this kind of =0D parameters directly from the object.=0D I have to check exactly what should be 'settable' and which interface =0D= will be correct with that (trying to avoid having too many functions =0D for that, maybe some kind of -setParameter:forKey: message).=0D =0D If other users are similar requirements or have preferences concerning =0D= the interface to these kind of setting, please answer (to the list so - =0D= - -if necessary- we can have a discution on that).=0D =0D Serge.=0D =0D PS: Aaron, sorry I sent you the mail from a wrong mail account, please =0D= if you answer me use the sourceforge mail account, and don't reply =0D directly to the previous mail. Thanks.=0D =0D Le 4 sept. 04, =E0 03:47, Aaron Jacobs a =E9crit :=0D =0D > I've run across a situation where it would be very unfortunate for my =0D= > application to automatically and silently re-establish its connection =0D= > to the MySQL server if it is lost. The only way I've found to disable = =0D > this behavior is to set the 'reconnect' member of the MYSQL structure =0D= > to zero, rather than the default of one. So what I need is a method =0D= > in MCPConnection that simply returns mConnection so that I can set the = =0D > flag. For now I'll make a subclass of MCPConnection since mConnection = =0D > is protected, but Serge do you think it would be possible to get such =0D= > a method officially supported?=0D >=0D > Thanks,=0D > Aaron=0D >=0D *******************************************=0D Serge Cohen=0D =0D GPG Key ID: 9CBB58FB=0D *******************************************=0D =0D -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (Darwin) iD8DBQFBPNTy5EPeG5y7WPsRAtTMAJ94ccaejFmam0EZIit++eoYd9mWTQCgkAKs 26hTqH7QqWdTFQGyIO8bZ34=3D =3DIARO -----END PGP SIGNATURE----- |
From: Aaron J. <aj...@ed...> - 2004-09-04 01:47:52
|
I've run across a situation where it would be very unfortunate for my application to automatically and silently re-establish its connection to the MySQL server if it is lost. The only way I've found to disable this behavior is to set the 'reconnect' member of the MYSQL structure to zero, rather than the default of one. So what I need is a method in MCPConnection that simply returns mConnection so that I can set the flag. For now I'll make a subclass of MCPConnection since mConnection is protected, but Serge do you think it would be possible to get such a method officially supported? Thanks, Aaron |
From: Serge C. <ser...@us...> - 2004-08-22 20:51:50
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello Dave;=0D =0D Indeed I've never seen the problem (because I've never tried putting an =0D= invalid host name).=0D The fact is that in the way I've implemented the connection, the =0D waiting does not occure in my code, but rather in the client library of =0D= MySQL.=0D =0D So I don't know how I can (easily) set a time out.=0D If anyone has some kind of idea on how that can be implemented, please =0D= send it. In short I'm just forwaring the question.=0D =0D Serge.=0D =0D Le 22 ao=FBt 04, =E0 14:42, David Borton a =E9crit :=0D =0D > Mr. Serge Cohen-=0D >=0D > My name is David Borton and I have been working with your framework =0D= > for sometime. I appreciate all of the work that you have done for the =0D= > MySQL and Cocoa cause. I do have one question, however.=0D >=0D > When I initialize a connection with initToHost:.... and I put in a =0D= > bad host address, the cursor spins and I see no way out. The program =0D= > I have written freezes as I see that Cocoa MySQL Display does as well. = =0D > Did you make any error checking mechanism for the MCPConnection =0D > object? The only way that I can see an out is if I start making the =0D= > connection through a new thread, then kill the thread after a certain =0D= > amount of time, but that is dangerous. If you know of anyway around =0D= > this, the help would be much appreciated.=0D >=0D > Again, thank you for working so hard on this framework.=0D >=0D > Dave Borton=0D > Washington University in St. Louis=0D >=0D >=0D >=0D *******************************************=0D Serge Cohen=0D =0D GPG Key ID: 9CBB58FB=0D *******************************************=0D =0D -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (Darwin) iD8DBQFBKQda5EPeG5y7WPsRAm+SAKCM+7NKtKILY6mj5cK6MwVmSZ5IOACeLfMP 8s2qJH7aqjfDnTcDhuOVMtE=3D =3DDUr1 -----END PGP SIGNATURE----- |
From: Lorenz T. <te...@st...> - 2004-08-16 18:00:09
|
Hi Serge, This would be a great idea! I could contribute the source of CocoaMySQL=20= as example code. (It's available already, but it would be nice to have=20= a page containing links to all available sources using the SMySQL=20 framework.) - Lorenz On 14. Aug 2004, at 05:48,=20 mys...@li... wrote: > Hi;=3D0D > =3D0D > Do people feel like it would be nice to have a repository of code =3D0D > contributed by SMySQL users?=3D0D > How many people on this list would be interested in sharing some of = =3D0D > there code, so that there's a place to look for some examples =3D0D > sources...=3D0D > =3D0D > Serge.=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: Camille GOUREAU-S. <ca...@lu...> - 2004-08-16 14:36:32
|
Hi (again) :) > Why not get the latest version of the framework? Because I didn't think I had a use for the new imrovements : - - unsigned integer (up to UNSIGNED BIGGINT, included). - - retrieve TEXT columns as NSString (not NSData anymore). - - a new method quoteObject (from MCPConnection), quoting object into a suitable way for use with MySQL (deciding the type of quoting from the class of the object). But I'll get it ASAP. Many thanks. Camille |
From: Aaron J. <aj...@ed...> - 2004-08-16 14:33:09
|
Why not get the latest version of the framework? On Aug 16, 2004, at 9:32 AM, Camille GOUREAU-SUIGNARD wrote: > Hi, > >> Are you sure there's no line after that? > Yeah. I usually don't bother to (badly) do something when it is (well) > done by somebody else. ;) > >> That's basically the exact same thing that you use in your error >> reporting code. > It's why I think I probably have a problem. >> If the second line is not there, what version of the framework are >> you using? > 2.2.1d1 > >> Have you modified it in any way? > I don't think so. > > In any way don't bother with that. it seems that I'm the only one with > this problem. There is no need to loose your time. > > Thanks. > > Camille > |
From: Camille GOUREAU-S. <ca...@lu...> - 2004-08-16 14:30:58
|
Hi, > Are you sure there's no line after that? Yeah. I usually don't bother to (badly) do something when it is (well) done by somebody else. ;) > That's basically the exact same thing that you use in your error > reporting code. It's why I think I probably have a problem. > If the second line is not there, what version of the framework are you > using? 2.2.1d1 > Have you modified it in any way? I don't think so. In any way don't bother with that. it seems that I'm the only one with this problem. There is no need to loose your time. Thanks. Camille |
From: Aaron J. <aj...@ed...> - 2004-08-16 14:12:14
|
Are you sure there's no line after that? Starting at line 502 of MCPConnection.m: NSLog (@"Problem in queryString error code is : %d, query is : %s -in ObjC : %@-\n", theQueryCode, theCQuery, query); NSLog(@"Error message is : %@\n", [self getLastErrorMessage]); That's basically the exact same thing that you use in your error reporting code. If the second line is not there, what version of the framework are you using? Have you modified it in any way? Aaron On Aug 16, 2004, at 8:59 AM, Camille GOUREAU-SUIGNARD wrote: > Hi all, > > it seems that i've got a problem with the framework. > With a trivial error in my code hre's what the frameworks tells via > the console : > > 2004-08-16 15:54:58.041 LLCaisse[623] Problem in queryString error > code is : -1, query is : select ERRORid from lulu.stock where > codebarre = "8712269354009" ; -in ObjC : select ERRORid from > lulu.stock where codebarre = "8712269354009" ;- > > and with my code : > > 2004-08-16 15:54:58.042 LLCaisse[623] erreur MySQL !! > 2004-08-16 15:54:58.042 LLCaisse[623] query : select ERRORid from > lulu.stock where codebarre = "8712269354009" ; > 2004-08-16 15:54:58.042 LLCaisse[623] error : Unknown column 'ERRORid' > in 'field list' > > Here, the error is rather trivial, but in somewhat complex query, it > helps me to have the error message from mySQL (third line of my > report). > > So I've perhaps forgot something, but I find a (my) complete report > usefull. > BTW, if I'm the only one to ask for this, just forget it. I'm sure you > have more important things to do. > > in any way, thanks for your work, I couldn't work without roue > framework. > > Camille > > > > ------------------------------------------------------- > SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media > 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 > Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. > http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 > _______________________________________________ > Mysql-cocoa-users mailing list > Mys...@li... > https://lists.sourceforge.net/lists/listinfo/mysql-cocoa-users |
From: Camille GOUREAU-S. <ca...@lu...> - 2004-08-16 13:57:38
|
Hi all, it seems that i've got a problem with the framework. With a trivial error in my code hre's what the frameworks tells via the console : 2004-08-16 15:54:58.041 LLCaisse[623] Problem in queryString error code is : -1, query is : select ERRORid from lulu.stock where codebarre = "8712269354009" ; -in ObjC : select ERRORid from lulu.stock where codebarre = "8712269354009" ;- and with my code : 2004-08-16 15:54:58.042 LLCaisse[623] erreur MySQL !! 2004-08-16 15:54:58.042 LLCaisse[623] query : select ERRORid from lulu.stock where codebarre = "8712269354009" ; 2004-08-16 15:54:58.042 LLCaisse[623] error : Unknown column 'ERRORid' in 'field list' Here, the error is rather trivial, but in somewhat complex query, it helps me to have the error message from mySQL (third line of my report). So I've perhaps forgot something, but I find a (my) complete report usefull. BTW, if I'm the only one to ask for this, just forget it. I'm sure you have more important things to do. in any way, thanks for your work, I couldn't work without roue framework. Camille |
From: Aaron J. <aj...@ed...> - 2004-08-16 12:19:52
|
Serge, If you do this, please continue to provide the "classic" version of the=20= method so that the unsigned int reference is not required to be used. =20= I'm fine with using if ([connection getLastErrorID]) to see if there's=20= an error. Aaron On Aug 16, 2004, at 1:35 AM, Serge Cohen wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi there; > > I'm a bit surprised by your mail. > In the current version of SMySQL I'm using I have a NSLog call if an=20= > error is produced during a connection query... > > Indeed the code at lines 501 and following from MCPConnection.m are=20 > doing more or less what you are doing yourself. > > By the way, I don't know if using [[connectMySQL getLastErrorMessage]=20= > compare:@""]!=3DNSOrderedSame is a proper way of checking for error in=20= > the last query. If it is really necessary, I can add a **BOOL argument=20= > to know if an error occured (the best would be indeed a **unsigned=20 > int, to get back the mysql_query return code (theQueryCode in my=20 > source)). > > What do people think about this change to the API (providing nil as=20 > the **unsigned int will avoid the need for having a correct reference=20= > to an unsigned int). > > Serge. > > PS: If users are interested, that can go in 3.0, hopefully coming not=20= > too late now. > > Le 14 ao=FBt 04, =E0 15:52, Lutin Ludique a =E9crit : > >> Hi, >> >> I'm thinking about an implementation of MCPConnection, but I'm afraid=20= >> to touch the framework source code. >> I usually need to have a detailed reporte about errors after each of=20= >> my queries, so I add these code after all queries (till I'm sure=20 >> they'll be OK in any circumstances) : >> >> if ([[connectMySQL getLastErrorMessage]=20 >> compare:@""]!=3DNSOrderedSame) { >> NSLog (@"erreur MySQL !!"); >> NSLog(@"query : %@", myQueryString); >> NSLog(@"error : %@", [connectMySQL getLastErrorMessage]); >> } >> >> Would it be possible (and easy to do by myself) to add a flag in=20 >> MCPConnection : BOOL errorReport >> And when it's set to TRUE, to NSLog detyailed reports after each=20 >> error ? >> >> Can somebody point me where to look and how to do without ruining the=20= >> code ? >> >> Thanks. >> >> Camille >> >> >> >> ------------------------------------------------------- >> SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank = Media >> 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 >> Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. >> http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 >> _______________________________________________ >> Mysql-cocoa-users mailing list >> Mys...@li... >> https://lists.sourceforge.net/lists/listinfo/mysql-cocoa-users >> >> > ******************************************* > Serge Cohen > > GPG Key ID: 9CBB58FB > ******************************************* > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.2.3 (Darwin) > > iD8DBQFBIFXF5EPeG5y7WPsRAgRfAKCkZWNLKH27HSqZTJGDVGqk85bLhACeJ4lH > b8vIUQHmT0pE8xt8r5QUyH0=3D > =3DiDJW > -----END PGP SIGNATURE----- > > > > ------------------------------------------------------- > SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media > 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 > Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. > http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 > _______________________________________________ > Mysql-cocoa-users mailing list > Mys...@li... > https://lists.sourceforge.net/lists/listinfo/mysql-cocoa-users |
From: Serge C. <ser...@us...> - 2004-08-16 06:36:02
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi there;=0D =0D I'm a bit surprised by your mail.=0D In the current version of SMySQL I'm using I have a NSLog call if an =0D error is produced during a connection query...=0D =0D Indeed the code at lines 501 and following from MCPConnection.m are =0D doing more or less what you are doing yourself.=0D =0D By the way, I don't know if using [[connectMySQL getLastErrorMessage] =0D= compare:@""]!=3DNSOrderedSame is a proper way of checking for error in =0D= the last query. If it is really necessary, I can add a **BOOL argument =0D= to know if an error occured (the best would be indeed a **unsigned int, =0D= to get back the mysql_query return code (theQueryCode in my source)).=0D =0D What do people think about this change to the API (providing nil as the =0D= **unsigned int will avoid the need for having a correct reference to an =0D= unsigned int).=0D =0D Serge.=0D =0D PS: If users are interested, that can go in 3.0, hopefully coming not =0D= too late now.=0D =0D Le 14 ao=FBt 04, =E0 15:52, Lutin Ludique a =E9crit :=0D =0D > Hi,=0D >=0D > I'm thinking about an implementation of MCPConnection, but I'm afraid =0D= > to touch the framework source code.=0D > I usually need to have a detailed reporte about errors after each of =0D= > my queries, so I add these code after all queries (till I'm sure =0D > they'll be OK in any circumstances) :=0D >=0D > if ([[connectMySQL getLastErrorMessage] =0D > compare:@""]!=3DNSOrderedSame) {=0D > NSLog (@"erreur MySQL !!");=0D > NSLog(@"query : %@", myQueryString);=0D > NSLog(@"error : %@", [connectMySQL getLastErrorMessage]);=0D > }=0D >=0D > Would it be possible (and easy to do by myself) to add a flag in =0D > MCPConnection : BOOL errorReport=0D > And when it's set to TRUE, to NSLog detyailed reports after each error = =0D > ?=0D >=0D > Can somebody point me where to look and how to do without ruining the =0D= > code ?=0D >=0D > Thanks.=0D >=0D > Camille=0D >=0D >=0D >=0D > -------------------------------------------------------=0D > SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media=0D= > 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33=0D > Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.=0D > http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285=0D > _______________________________________________=0D > Mysql-cocoa-users mailing list=0D > Mys...@li...=0D > https://lists.sourceforge.net/lists/listinfo/mysql-cocoa-users=0D >=0D >=0D *******************************************=0D Serge Cohen=0D =0D GPG Key ID: 9CBB58FB=0D *******************************************=0D =0D -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (Darwin) iD8DBQFBIFXF5EPeG5y7WPsRAgRfAKCkZWNLKH27HSqZTJGDVGqk85bLhACeJ4lH b8vIUQHmT0pE8xt8r5QUyH0=3D =3DiDJW -----END PGP SIGNATURE----- |
From: Aaron J. <aj...@ed...> - 2004-08-15 01:52:30
|
A couple of points. First, it looks like MCPConnection already does this. From MCPConnection.m, in the queryString: method: NSLog (@"Problem in queryString error code is : %d, query is : %s -in ObjC : %@-\n", theQueryCode, theCQuery, query); NSLog(@"Error message is : %@\n", [self getLastErrorMessage]); // theResult = [theResult init]; // Old version... theResult = nil; Whenever I have an error, I get that output on the console. Second, it seems like it would be much quicker to check for errors in your code like this: if ([connection getLastErrorID]) That just checks for a non-zero error ID, which I think will be much faster than doing a string compare each time. That's how I do it in my code. Aaron On Aug 14, 2004, at 4:17 PM, Camille GOUREAU-SUIGNARD wrote: > Hi, > > I'm thinking about an implementation of MCPConnection, but I'm afraid > to touch the framework source code. > I usually need to have a detailed report about errors after each of my > queries, so I add this code after all queries (till I'm sure they'll > be OK in any circumstances) : > > if ([[connectMySQL getLastErrorMessage] > compare:@""]!=NSOrderedSame) { > NSLog (@"erreur MySQL !!"); > NSLog(@"query : %@", myQueryString); > NSLog(@"error : %@", [connectMySQL getLastErrorMessage]); > } > > Would it be possible (and easy to do by myself) to add a flag in > MCPConnection : BOOL errorReport > And when it's set to TRUE, to NSLog detailed reports after each error ? > > Can somebody point me where to look and how to do without ruining the > code ? > > Thanks. > > Camille > > > > ------------------------------------------------------- > SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media > 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 > Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. > http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 > _______________________________________________ > Mysql-cocoa-users mailing list > Mys...@li... > https://lists.sourceforge.net/lists/listinfo/mysql-cocoa-users |
From: Camille GOUREAU-S. <ca...@lu...> - 2004-08-14 21:15:34
|
Hi, I'm thinking about an implementation of MCPConnection, but I'm afraid to touch the framework source code. I usually need to have a detailed report about errors after each of my queries, so I add this code after all queries (till I'm sure they'll be OK in any circumstances) : if ([[connectMySQL getLastErrorMessage] compare:@""]!=NSOrderedSame) { NSLog (@"erreur MySQL !!"); NSLog(@"query : %@", myQueryString); NSLog(@"error : %@", [connectMySQL getLastErrorMessage]); } Would it be possible (and easy to do by myself) to add a flag in MCPConnection : BOOL errorReport And when it's set to TRUE, to NSLog detailed reports after each error ? Can somebody point me where to look and how to do without ruining the code ? Thanks. Camille |
From: Lutin L. <in...@lu...> - 2004-08-14 20:50:52
|
Hi, I'm thinking about an implementation of MCPConnection, but I'm afraid to touch the framework source code. I usually need to have a detailed reporte about errors after each of my queries, so I add these code after all queries (till I'm sure they'll be OK in any circumstances) : if ([[connectMySQL getLastErrorMessage] compare:@""]!=NSOrderedSame) { NSLog (@"erreur MySQL !!"); NSLog(@"query : %@", myQueryString); NSLog(@"error : %@", [connectMySQL getLastErrorMessage]); } Would it be possible (and easy to do by myself) to add a flag in MCPConnection : BOOL errorReport And when it's set to TRUE, to NSLog detyailed reports after each error ? Can somebody point me where to look and how to do without ruining the code ? Thanks. Camille |
From: Kleanthis E. <kle...@ea...> - 2004-08-14 17:24:58
|
Hello; I am trying to get mySQL Cocoa working, bundled in a proof of concept app and I am running into a problem which I am assuming is rather trivial: MCPConnection *conn = [[MCPConnection alloc] initToHost:@"the.host.here" withLogin:@"user" password:@"pass" usingPort:0]; After this, conn is 0x0 and obviously can do nothing with it. The sample apps compiles fine with no errors or warnings. Any assistance greatly appreciated. Thanks Kleanthis |
From: Camille GOUREAU-S. <ca...@lu...> - 2004-08-14 07:20:57
|
Hi, 1. yes, it's a collection of function. I'll think about making it an object, but I'm not quite sure of the gain : each request seems to be different. 2. If my code is of any interest, i'll give it under whatever license is of best use for users. no need for propriety (knowing how I writes code, would make most of you laugh). Camille |
From: Serge C. <ser...@us...> - 2004-08-14 03:06:56
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Aaron;=0D =0D It will be under GPL.=0D In the mean time (as I stated previously in this list), I can think of =0D= releasing under different license, provided that I have some =0D 'customers' : MySQL is under GPL (so all software that uses MySQL as =0D sole DB server as to be GPL), and if I want to release under non-GPL I =0D= have to buy myself a MySQL license.=0D =0D Indeed it's not all clear how to do that, and I'd rather spend the time =0D= only if there is a demand.=0D =0D Serge.=0D =0D Le 13 ao=FBt 04, =E0 18:37, Aaron Jacobs a =E9crit :=0D =0D > Serge,=0D >=0D > Will you be releasing this layer under the GPL? Also, where can I get = =0D > a copy of your GPG key?=0D >=0D > Aaron=0D >=0D >=0D >=0D > On Aug 13, 2004, at 6:35 PM, Serge Cohen wrote:=0D >=0D >> -----BEGIN PGP SIGNED MESSAGE-----=0D >> Hash: SHA1=0D >>=0D >> Hi;=0D >>=0D >> Do people feel like it would be nice to have a repository of code =0D >> contributed by SMySQL users?=0D >> How many people on this list would be interested in sharing some of =0D= >> there code, so that there's a place to look for some examples =0D >> sources...=0D >>=0D >> Serge.=0D >>=0D >> PS: Note that I'm developping some kind of enterprise layer on top of = =0D >> SMySQL. This is a way to easily use a MySQL DB server to ensure =0D >> persistence of your data, providing an easy way to map an object (of =0D= >> a given class) to a row (of a precise table, depending on the class =0D= >> of the object).=0D >> Then the MCPQuery you're developping can become some how (in EOF =0D >> parlance) a FetchSpecification... But I'm not there yet!=0D >>=0D >>=0D >> Le 13 ao=FBt 04, =E0 17:51, Aaron Jacobs a =E9crit :=0D >>=0D >>> Sounds like an interesting idea. Based on your method declarations, = =0D >>> this seems to really just be a collection of functions - there's =0D >>> nothing object oriented about it. I recommend making this into an =0D= >>> actual object, and modifying the SMySQL methods to take MCPQuery =0D >>> objects instead of NSStrings. That might open up some more =0D >>> interesting possibilities.=0D >>>=0D >>> Aaron=0D >>>=0D >>>=0D >>>=0D >>> On Aug 13, 2004, at 4:39 PM, Camille GOUREAU-SUIGNARD wrote:=0D >>>=0D >>>> Hi,=0D >>>>=0D >>>> I've created (part of) a classe I called MCPQuery.=0D >>>> It provides me query (NSString*) when feeded with information.=0D >>>> Has one of you already worked on such a thing ?=0D >>>> Is it a non sense ?=0D >>>> Is there a better way to avoid re-writing the sames lines of code ?=0D= >>>>=0D >>>> Here are the functions I implemented :=0D >>>>=0D >>>> + (NSString*) selectQueryWithSelect: (NSDictionary*) fields =0D >>>> andWhere: (NSString*) where ;=0D >>>> // returns a "select from xhere" string with the fields = extracted =0D >>>> from fields and the from also=0D >>>> + (NSString*) fromStringWithFields: (NSDictionary*) fields ;=0D >>>> + (NSString*) queryEmptyInsertInTable: (NSString*) table ;=0D >>>> + (NSString*) queryShowColumnsFromTable: (NSString*) table ;=0D >>>> + (NSString*) queryUpdateFields: (NSDictionary*) fields inTable: =0D= >>>> (NSString*) table where: (NSString*) where ;=0D >>>> + (NSString*) queryInsertFields: (NSDictionary*) fields inTable: =0D= >>>> (NSString*) table ;=0D >>>>=0D >>>>=0D >>>>=0D >>>> -------------------------------------------------------=0D >>>> SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank =0D= >>>> Media=0D >>>> 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33=0D= >>>> Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.=0D= >>>> http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285=0D >>>> _______________________________________________=0D >>>> Mysql-cocoa-users mailing list=0D >>>> Mys...@li...=0D >>>> https://lists.sourceforge.net/lists/listinfo/mysql-cocoa-users=0D >>>>=0D >> *******************************************=0D >> Serge Cohen=0D >>=0D >> GPG Key ID: 9CBB58FB=0D >> *******************************************=0D >>=0D >> -----BEGIN PGP SIGNATURE-----=0D >> Version: GnuPG v1.2.3 (Darwin)=0D >>=0D >> iD8DBQFBHVBk5EPeG5y7WPsRAnlpAKC/dXhR3e+0W653LDYtET5n59zCyACg7+Bk=0D >> NqLQQRRIT14oy1HzDxSpdkE=3D=0D >> =3DMeoT=0D >> -----END PGP SIGNATURE-----=0D >>=0D >>=0D *******************************************=0D Serge Cohen=0D =0D GPG Key ID: 9CBB58FB=0D *******************************************=0D =0D -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (Darwin) iD8DBQFBHYHE5EPeG5y7WPsRAv86AJ0S2OoMiwNxcDXUKo4nSSwl3z/twACeNrL8 T5Sp9LNt7KHEmc+A6DDKNms=3D =3DCqY3 -----END PGP SIGNATURE----- |
From: Aaron J. <aj...@ed...> - 2004-08-13 23:38:01
|
Serge, Will you be releasing this layer under the GPL? Also, where can I get=20= a copy of your GPG key? Aaron On Aug 13, 2004, at 6:35 PM, Serge Cohen wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi; > > Do people feel like it would be nice to have a repository of code=20 > contributed by SMySQL users? > How many people on this list would be interested in sharing some of=20 > there code, so that there's a place to look for some examples=20 > sources... > > Serge. > > PS: Note that I'm developping some kind of enterprise layer on top of=20= > SMySQL. This is a way to easily use a MySQL DB server to ensure=20 > persistence of your data, providing an easy way to map an object (of a=20= > given class) to a row (of a precise table, depending on the class of=20= > the object). > Then the MCPQuery you're developping can become some how (in EOF=20 > parlance) a FetchSpecification... But I'm not there yet! > > > Le 13 ao=FBt 04, =E0 17:51, Aaron Jacobs a =E9crit : > >> Sounds like an interesting idea. Based on your method declarations,=20= >> this seems to really just be a collection of functions - there's=20 >> nothing object oriented about it. I recommend making this into an=20 >> actual object, and modifying the SMySQL methods to take MCPQuery=20 >> objects instead of NSStrings. That might open up some more=20 >> interesting possibilities. >> >> Aaron >> >> >> >> On Aug 13, 2004, at 4:39 PM, Camille GOUREAU-SUIGNARD wrote: >> >>> Hi, >>> >>> I've created (part of) a classe I called MCPQuery. >>> It provides me query (NSString*) when feeded with information. >>> Has one of you already worked on such a thing ? >>> Is it a non sense ? >>> Is there a better way to avoid re-writing the sames lines of code ? >>> >>> Here are the functions I implemented : >>> >>> + (NSString*) selectQueryWithSelect: (NSDictionary*) fields=20 >>> andWhere: (NSString*) where ; >>> // returns a "select from xhere" string with the fields = extracted=20 >>> from fields and the from also >>> + (NSString*) fromStringWithFields: (NSDictionary*) fields ; >>> + (NSString*) queryEmptyInsertInTable: (NSString*) table ; >>> + (NSString*) queryShowColumnsFromTable: (NSString*) table ; >>> + (NSString*) queryUpdateFields: (NSDictionary*) fields inTable:=20 >>> (NSString*) table where: (NSString*) where ; >>> + (NSString*) queryInsertFields: (NSDictionary*) fields inTable:=20 >>> (NSString*) table ; >>> >>> >>> >>> ------------------------------------------------------- >>> SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank=20 >>> Media >>> 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 >>> Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. >>> http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 >>> _______________________________________________ >>> Mysql-cocoa-users mailing list >>> Mys...@li... >>> https://lists.sourceforge.net/lists/listinfo/mysql-cocoa-users >>> > ******************************************* > Serge Cohen > > GPG Key ID: 9CBB58FB > ******************************************* > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.2.3 (Darwin) > > iD8DBQFBHVBk5EPeG5y7WPsRAnlpAKC/dXhR3e+0W653LDYtET5n59zCyACg7+Bk > NqLQQRRIT14oy1HzDxSpdkE=3D > =3DMeoT > -----END PGP SIGNATURE----- > |
From: Serge C. <ser...@us...> - 2004-08-13 23:36:11
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi;=0D =0D Do people feel like it would be nice to have a repository of code =0D contributed by SMySQL users?=0D How many people on this list would be interested in sharing some of =0D there code, so that there's a place to look for some examples =0D sources...=0D =0D Serge.=0D =0D PS: Note that I'm developping some kind of enterprise layer on top of =0D= SMySQL. This is a way to easily use a MySQL DB server to ensure =0D persistence of your data, providing an easy way to map an object (of a =0D= given class) to a row (of a precise table, depending on the class of =0D the object).=0D Then the MCPQuery you're developping can become some how (in EOF =0D parlance) a FetchSpecification... But I'm not there yet!=0D =0D =0D Le 13 ao=FBt 04, =E0 17:51, Aaron Jacobs a =E9crit :=0D =0D > Sounds like an interesting idea. Based on your method declarations, =0D= > this seems to really just be a collection of functions - there's =0D > nothing object oriented about it. I recommend making this into an =0D > actual object, and modifying the SMySQL methods to take MCPQuery =0D > objects instead of NSStrings. That might open up some more =0D > interesting possibilities.=0D >=0D > Aaron=0D >=0D >=0D >=0D > On Aug 13, 2004, at 4:39 PM, Camille GOUREAU-SUIGNARD wrote:=0D >=0D >> Hi,=0D >>=0D >> I've created (part of) a classe I called MCPQuery.=0D >> It provides me query (NSString*) when feeded with information.=0D >> Has one of you already worked on such a thing ?=0D >> Is it a non sense ?=0D >> Is there a better way to avoid re-writing the sames lines of code ?=0D= >>=0D >> Here are the functions I implemented :=0D >>=0D >> + (NSString*) selectQueryWithSelect: (NSDictionary*) fields andWhere: = =0D >> (NSString*) where ;=0D >> // returns a "select from xhere" string with the fields = extracted =0D >> from fields and the from also=0D >> + (NSString*) fromStringWithFields: (NSDictionary*) fields ;=0D >> + (NSString*) queryEmptyInsertInTable: (NSString*) table ;=0D >> + (NSString*) queryShowColumnsFromTable: (NSString*) table ;=0D >> + (NSString*) queryUpdateFields: (NSDictionary*) fields inTable: =0D >> (NSString*) table where: (NSString*) where ;=0D >> + (NSString*) queryInsertFields: (NSDictionary*) fields inTable: =0D >> (NSString*) table ;=0D >>=0D >>=0D >>=0D >> -------------------------------------------------------=0D >> SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank = Media=0D >> 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33=0D >> Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.=0D >> http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285=0D >> _______________________________________________=0D >> Mysql-cocoa-users mailing list=0D >> Mys...@li...=0D >> https://lists.sourceforge.net/lists/listinfo/mysql-cocoa-users=0D >>=0D *******************************************=0D Serge Cohen=0D =0D GPG Key ID: 9CBB58FB=0D *******************************************=0D =0D -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (Darwin) iD8DBQFBHVBk5EPeG5y7WPsRAnlpAKC/dXhR3e+0W653LDYtET5n59zCyACg7+Bk NqLQQRRIT14oy1HzDxSpdkE=3D =3DMeoT -----END PGP SIGNATURE----- |
From: Aaron J. <aj...@ed...> - 2004-08-13 22:51:53
|
Sounds like an interesting idea. Based on your method declarations, this seems to really just be a collection of functions - there's nothing object oriented about it. I recommend making this into an actual object, and modifying the SMySQL methods to take MCPQuery objects instead of NSStrings. That might open up some more interesting possibilities. Aaron On Aug 13, 2004, at 4:39 PM, Camille GOUREAU-SUIGNARD wrote: > Hi, > > I've created (part of) a classe I called MCPQuery. > It provides me query (NSString*) when feeded with information. > Has one of you already worked on such a thing ? > Is it a non sense ? > Is there a better way to avoid re-writing the sames lines of code ? > > Here are the functions I implemented : > > + (NSString*) selectQueryWithSelect: (NSDictionary*) fields andWhere: > (NSString*) where ; > // returns a "select from xhere" string with the fields extracted > from fields and the from also > + (NSString*) fromStringWithFields: (NSDictionary*) fields ; > + (NSString*) queryEmptyInsertInTable: (NSString*) table ; > + (NSString*) queryShowColumnsFromTable: (NSString*) table ; > + (NSString*) queryUpdateFields: (NSDictionary*) fields inTable: > (NSString*) table where: (NSString*) where ; > + (NSString*) queryInsertFields: (NSDictionary*) fields inTable: > (NSString*) table ; > > > > ------------------------------------------------------- > SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media > 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 > Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. > http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 > _______________________________________________ > Mysql-cocoa-users mailing list > Mys...@li... > https://lists.sourceforge.net/lists/listinfo/mysql-cocoa-users |