[PHP-DEV] PHP 4.0 Bug #8089: No ODBC function that returns SQL error messages From: jlim <email protected>
Date: 12/04/00

From: jlim <email protected>
Operating system: Windows
PHP version: 4.0.3pl1
PHP Bug Type: ODBC related
Bug description: No ODBC function that returns SQL error messages

I am having a problem because ODBC error messages are sent to standard output and there doesn't seem to be a function to capture the ODBC error message.

May i suggest a new ODBC function ODBC_Error() which saves the last error message for each connection.

Eg.

$ok = ODBC_Execute($id,'select * from badtable');
if (!$ok) LogError(ODBC_Error($id));

This can be implemented in php_odbc.c, presumbly by modifying the odbc_sql_error function.

461 void odbc_sql_error(ODBC_SQL_ERROR_PARAMS)

-- 
Edit Bug report at: http://bugs.php.net/?id=8089&edit=1

-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>