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

2008-09-04 Thread geoff dot brisbine at gmail dot com
 ID:   40695
 Comment by:   geoff dot brisbine at gmail dot com
 Reported By:  a at bc dot de
 Status:   Open
 Bug Type: ODBC related
 Operating System: Windows
 PHP Version:  5.2.1
 New Comment:

It's happening for me on Windows XP Pro SP2 w/Apache 2.2 and PHP 5.2.6
(php5apache2_2.dll).


Previous Comments:


[2007-03-02 18:34:29] a at bc dot de

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";
$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 this bug report at http://bugs.php.net/?id=40695&edit=1



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

2008-09-04 Thread geoff dot brisbine at gmail dot com
 ID:   40695
 Comment by:   geoff dot brisbine at gmail dot com
 Reported By:  a at bc dot de
 Status:   Open
 Bug Type: ODBC related
 Operating System: Windows
 PHP Version:  5.2.1
 New Comment:

Forgot in last post, this is accessing Paradox 4.x tables.


Previous Comments:


[2008-09-05 02:48:31] geoff dot brisbine at gmail dot com

It's happening for me on Windows XP Pro SP2 w/Apache 2.2 and PHP 5.2.6
(php5apache2_2.dll).



[2007-03-02 18:34:29] a at bc dot de

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";
$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 this bug report at http://bugs.php.net/?id=40695&edit=1