ODBC and error management
| From: | Nico Sabbi | Date: | Tue, 10 Jun 2003 11:01:26 +0000 |
| Subject: | ODBC and error management | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-28472@lists.php.net to get a copy of this message | ||
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