From:             kerry dot eade at capellaconsulting dot co dot nz
Operating system: Windows Server 2003
PHP version:      5.1.2
PHP Bug Type:     ODBC related
Bug description:  odbc_tables fails with SQLerror: , SQL state 0000

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

-- 
Edit bug report at http://bugs.php.net/?id=36650&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=36650&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): 
http://bugs.php.net/fix.php?id=36650&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=36650&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=36650&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=36650&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=36650&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=36650&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=36650&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=36650&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=36650&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=36650&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=36650&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=36650&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=36650&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=36650&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=36650&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=36650&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=36650&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=36650&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=36650&r=mysqlcfg
  • #36650 [NEW]: odbc_table... kerry dot eade at capellaconsulting dot co dot nz

Reply via email to