Re: [opendbx] odbx_error_type
Brought to you by:
nose
From: OpenDBX d. l. <lib...@li...> - 2008-04-22 07:50:59
|
Hi Mariano > Hi! I have some dudes with this function. I really don't understand its > use. I read this: > http://www.linuxnetworks.de/doc/index.php/OpenDBX/API/odbx_error_type but i > am still don't know when to use it. > can someone explain me why should I use this function? Let's take odbx_query() (or any other function) as example, which returned an error. If the return value of odbx_error_type() is negative, you've hit a severe error like the connection to the server is broken. In this case you have to call odbx_unbind(), odbx_finish(), odbx_init() and odbx_bind() in this order to recreate the connection. Otherwise, if the return value was positive your statement might have been not understood by the database server. Here you can continue to send the next statement to the server without the need to recreate the connection. Hope I could help you Norbert -- OpenPGP public key http://www.linuxnetworks.de/norbert.pubkey.asc |