Nico, I'm using MyODBC to query MySQL (because my client want's it to work in Access, and I don't and this leaves the least amount of code to change).
I don't get an error message if the result is empty (no records). I do a while loop and add to a counter and if the counter <1 then its empty otherwise I display the results. I do get the errors though when the query is 'bad' - contains errors. I'm running mine on both WinNT and Win2K with identical results. Hope this helps. George > -----Original Message----- > From: Nico Sabbi [mailto:[EMAIL PROTECTED] > Sent: 10 June 2003 12:01 pm > To: [EMAIL PROTECTED] > Subject: [PHP-DB] ODBC and error management > > > > > Hi, > > reading both the documentation and the MARC I found two serious > misbehaviours: > > 1) it seems that it's impossible to tell a query that is correct > but has no > records > from a query which is syntactically wrong (and consequently has > no records); > > or at least it seems to be impossibile to distinguish these two cases > without using odbc_num_rows, which is buggy itself > (because it loses in generality, so can't be used). > > 2) when using myodbc the string returned by odbc_errormsg() is always > non-sense: it doesn't contain > the real error msg returned by the db-server, but > > "unixODBC][MySQL][ODBC 3.51 Driver][mysqld-3.23.56-Max-log]Option value > changed to default static cursor" > > that obviously doesn't say anything useful. > > > Is there a way to workaround, or even better to solve, these problems? > > Thanks, > Nico > > > > > > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php