#40695 [NEW]: odbc_execute/prepared statements does not work with Access

From: Date: Fri, 02 Mar 2007 18:34:29 +0000
Subject: #40695 [NEW]: odbc_execute/prepared statements does not work with Access
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-109800@lists.php.net to get a copy of this message
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 http://bugs.php.net/?id=40695&edit=1
-- 
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40695&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40695&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40695&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=40695&r=fixedcvs
Fixed in release:             http://bugs.php.net/fix.php?id=40695&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=40695&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=40695&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=40695&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=40695&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=40695&r=notwrong
Not enough info:              http://bugs.php.net/fix.php?id=40695&r=notenoughinfo
Submitted twice:              http://bugs.php.net/fix.php?id=40695&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=40695&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=40695&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=40695&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=40695&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=40695&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=40695&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=40695&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=40695&r=mysqlcfg


Thread (7 messages)

« previous php.bugs (#109800) next »