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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: jlim at natsoft dot com dot my
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 06 20:01:35 2025 UTC