PHP 4.0 Bug #6275: ODBC_Prepare/ODBC_Execute fails with parameters

From: Date: Mon, 21 Aug 2000 13:16:20 +0000
Subject: PHP 4.0 Bug #6275: ODBC_Prepare/ODBC_Execute fails with parameters
Groups: php.dev 
Request: Send a blank email to php-dev+get-30041@lists.php.net to get a copy of this message
From: jlim@natsoft.com.my Operating system: Windows 98 PHP version: 4.0.1pl2 PHP Bug Type: ODBC related Bug description: ODBC_Prepare/ODBC_Execute fails with parameters Hello, My problem is odbc_execute fails with the following error message: Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver]COUNT field incorrect , SQL state 07001 in SQLExecute in d:\Inetpub\wwwroot\php\adodb\index.php on line 77 The odbc_exec INSERT works fine. I am using a plain vanilla NorthWind MS Access database and am using the ISAPI version of PHP, with ODBC built in. Sample code: $conn = odbc_connect("nwind","",""); odbc_exec($conn,"drop table ADOXYZ"); odbc_exec($conn,"create table ADOXYZ (id int, firstname char(24), lastname char(24))"); odbc_exec($conn,"insert into ADOXYZ (id,firstname,lastname) values (0,'Zend','PHP')"); $stmt = odbc_prepare($conn,"insert into ADOXYZ (id,firstname,lastname) values (?,?,?)"); if ($stmt) { print "Trying execute<br>"; $stmt = odbc_execute($stmt,array(1,"John","Lim")); }

« previous php.dev (#30041) next »