php.net |  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
Votes:1
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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: kerry dot eade at capellaconsulting dot co dot nz
New email:
PHP Version: OS:

 

 [2006-03-08 00:03 UTC] kerry dot eade at capellaconsulting dot co dot nz
Description:
------------
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);

odbc_columns($conn_string,"","$schema","$table");

while($details=odbc_fetch_array($queryexe2))
{
    $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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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.

http://www-1.ibm.com/support/docview.wss?uid=swg21215626
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 20:01:29 2024 UTC