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