php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8089 No ODBC function that returns SQL error messages
Submitted: 2000-12-04 02:00 UTC Modified: 2001-02-03 20:17 UTC
From: jlim at natsoft dot com dot my Assigned:
Status: Closed Package: ODBC related
PHP Version: 4.0.3pl1 OS: Windows
Private report: No CVE-ID: None
 [2000-12-04 02:00 UTC] jlim at natsoft dot com dot my
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)


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-02-03 20:17 UTC] sniper@php.net
According to phobo <antiphobo@paradise.net.nz>,
ODBC Error functions are now written as of php404.

--Jani

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 08:01:28 2024 UTC