note 13632 deleted from function.odbc-prepare by sniper
| From: | sniper@php.net | Date: | Thu, 28 Aug 2003 11:00:56 +0000 |
| Subject: | note 13632 deleted from function.odbc-prepare by sniper | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-55214@lists.php.net to get a copy of this message | ||
Note Submitter: marshall.lewis@ScholarOne.com
----
There seems to be a bug in the way that PHP talks to IBM DB2. When trying to prepare a query on a
table that has a CLOB field it will always fail with the following message:
"Warning: SQL error: [IBM][CLI Driver] CLI0005W Option value changed. SQLSTATE=01S02, SQL state
01S02 in SQLPrepare".
This, according to most sources, is not an error message to worry about, and it gives pretty much no
clue as to the cause of the problem (in case you are interested, it relates to the cursor type).
Experimentation showed that it always happens with CLOBs .. it probably will happen with a BLOB as
well (large VARCHARS > 255 will work though). The only way we have found to get around this
problem is to actually use the ODBC connection (setting up unixODBC instead of the DB2 client) or to
use odbc_exec.
We have a slight performance hit for interfacing through ODBC, being able to use prepare more than
makes up for it. Using the ODBC connection has also fixed a problems we had with persistant
connections and with stored procedures.
Last thing... we still get the same error message when preparing a statement.. but everything works
as it is intended. You can surpress the message by prepending '@' on to odbc_prepare as
flows:
$query_id = @odbc_prepare($connection_id,$query_string);
If you need any more information, email me.