Hi, João Henrique Freitas writes: > My question is: After a invalid sql query, the error flag is 1, > following, after a valid query the error flag is 1. This is right? >
I'm sorry for the late answer, but it took me some time to investigate, and I'm still not 100% sure whether my analysis is correct. As far as I can tell, dbi_conn_error_flag() was not designed to indicate success or failure of a query. You should consult dbi_conn_error() instead. The purpose of dbi_conn_error_flag() is to provide additional information about the success or failure of the dbi_result_get*() family of functions. That is, after calling e.g. dbi_result_get_int(), the value returned by dbi_conn_error_flag() might indicate that you tried to access a field defined as TEXT with the wrong getter. There are two things left to fix: 1) I'll try to find out why the error flag is not reset properly after each query. In no case the flag should indicate an error if the query was successful. 2) As the function name apparently suggests improper use of the dbi_conn_error_flag() function, we might consider renaming it to dbi_result_error_flag(), as the error flag is used only in context of a successful query. Do I hear any second opinions about this? In any case, thanks for reporting this problem. I'll work on this before pushing out the next libdbi and libdbi-drivers releases. regards, Markus -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users