|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36650 odbc_tables fails with SQLerror: , SQL state 0000
Submitted: 2006-03-08 00:03 UTC Modified: 2006-03-13 01:37 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: kerry dot eade at capellaconsulting dot co dot nz Assigned:
Status: Not a bug Package: ODBC related
PHP Version: 5.1.2 OS: Windows Server 2003
Private report: No CVE-ID: None
 [2006-03-08 00:03 UTC] kerry dot eade at capellaconsulting dot co dot nz
I have been successfully using the ODBC_COLUMNS and ODBC_TABLES commands on DB2 7.2 and DB2 8.2 databases. These functions have been working on both windows and unix platforms.

After updating DB2 8.2 with FP11 (No problems with any early FixPaks) which also updated the ODBC driver these commands now produce an error:

SQL error: , SQL state 00000

My understanding is this state indicates it was successful and normally reported as a return value of SQL_SUCCESS.

Are these commands expecting a return value of SQL_SUCCESS and incorrectly interpreting the return value SQLSTATE 00000 as an error?

Reproduce code:
$conn_string = odbc_connect($db_name,$db_user,$db_pass);


    $all_columns[] = "$table.".$details['COLUMN_NAME'];

Expected result:
Produces a list of columns in the selected table.

Actual result:
Warning: odbc_columns() [function.odbc-columns]: SQL error: , SQL state 00000 in SQLColumns in c:\program files\apache group\Apache\htdocs\mrs_prod\mrsscripts\make_report.php on line 548


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-03-13 01:37 UTC] kerry dot eade at capellaconsulting dot co dot nz
Issue resolved. DB2 Issue not PHP (Of Course).

See below link for details and fix.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Tue May 17 05:05:45 2022 UTC