Re: [Mysql-cocoa-users] MCPConnection upgrade
Brought to you by:
sergecohen
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----- |