note 4761 modified in odbc_prepare by ronabop

From: Date: Wed, 11 Oct 2000 04:09:34 +0000
Subject: note 4761 modified in odbc_prepare by ronabop
Groups: php.notes 
Request: Send a blank email to php-notes+get-6354@lists.php.net to get a copy of this message
Got an error from DB2's ODBC implementation (running on Solaris 260). Error message "Warning: SQL error: [IBM][CLI Driver] CLI0005W Option value changed. SQLSTATE=01S02, SQL state 01S02 in SQLPrepare". Replace odbc_prepare & odbc_execute with odbc_do as follows: <? // Using odbc_prepare & odbc_execute $conn_id = odbc_connect('ODBC_DSN','USER','PASSWORD'); $stmt = odbc_prepare($conn_id,"select count * from test_table"); $exe_id = odbc_execute($stmt); $answer = odbc_result($stmt, 1); odbc_close($conn_id); ?> <? // Replace with odbc_do $conn_id = odbc_connect('ODBC_DSN','USER','PASSWORD'); $exe_id = odbc_do($conn_id, "select count * from test_table"); $answer = odbc_result($exe_id, 1); odbc_close($conn_id); ?> http://www.php.net/manual/function.odbc-prepare.php

« previous php.notes (#6354) next »