[Gambas-devel] ODBC - new version

Andrea Bortolan andrea_bortolan at ...112...
Fri Apr 15 12:38:08 CEST 2005


Hi Benoìt,
in this new version I've implemented your suggestions.
The Gamabs DB manager works fine without any changes
if he odbc driver used returns the number of rows
fetched (mysql,postgres ecc.). For all the others odbc
drivers that return -1 a code changes is needed.

Thanks for your suggestions and let me know if the
code need some other changes.

Have a nice day,Andrea.


--- Benoit Minisini <gambas at ...1...>
wrote:
> 
> A few remarks:
> 
> 1) You can choose, instead of returning an error, to
> implement what you added 
> to the database manager directly in the driver. This
> way, some database 
> manager hacks become unnecessary :-)
> 
> I mean, for example:
> 
> table_is_system() will always return that the table
> is not a table system, 
> instead of returning an error.
> 
> user_*() functions will always behave as if there is
> only one user, the login 
> passed to the Connection object.

this version does not rise errors for the
unimplemented functions.

> 
> 2) Never use printf() or fprintf(stderr...). Or put
> the messages between 
> #ifdef/#endif so that they can be disabled.

you're right....sorry, I didn't review the code before
sending it. 
No more printf in this version .


> 3) When there is an error:
> a) Call GB.Error() with the true error message.
> Don't put "ODBC Error". Put 
> the error message.
> b) Return immediately. GB.Error() does not return
> from the function from you. 
> This function just record the error message for
> displaying it later.
> 

done.

> Regards,
> 
> -- 
> Benoit Minisini
> mailto:gambas at ...1...
> 
> 
>
-------------------------------------------------------
> 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_ide95&alloc_id396&op=click
> _______________________________________________
> Gambas-devel mailing list
> Gambas-devel at lists.sourceforge.net
>
https://lists.sourceforge.net/lists/listinfo/gambas-devel
> 


		
___________________________________ 
Nuovo Yahoo! Messenger: E' molto più divertente: Audibles, Avatar, Webcam, Giochi, Rubrica
 Scaricalo ora! 
http://it.messenger.yahoo.it
-------------- next part --------------
A non-text attachment was scrubbed...
Name: main.c
Type: text/x-c
Size: 57327 bytes
Desc: main.c
URL: <http://lists.gambas-basic.org/pipermail/devel/attachments/20050415/84b1de88/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ChangeLog
Type: application/octet-stream
Size: 456 bytes
Desc: ChangeLog
URL: <http://lists.gambas-basic.org/pipermail/devel/attachments/20050415/84b1de88/attachment.obj>


More information about the Devel mailing list