From: a at bc dot de
Operating system: Windows
PHP version: 5.2.1
PHP Bug Type: ODBC related
Bug description: odbc_execute/prepared statements does not work with Access

Description:
------------
[repost of bug 6275]

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.



Reproduce 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"));
}

Actual result:
--------------
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

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