PHP 4.0 Bug #6275 Updated: ODBC_Prepare/ODBC_Execute fails with parameters
| From: | kalowsky@php.net | Date: | Mon, 12 Mar 2001 02:01:49 +0000 |
| Subject: | PHP 4.0 Bug #6275 Updated: ODBC_Prepare/ODBC_Execute fails with parameters | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-48690@lists.php.net to get a copy of this message | ||
ID: 6275
Updated by: kalowsky
Reported By: jlim@natsoft.com.my
Old-Status: Open
Status: Analyzed
Bug Type: ODBC related
Assigned To: kalowsky
Comments:
Previous Comments:
---------------------------------------------------------------------------
[2001-02-14 08:20:41] kalowsky@php.net
starting to look into windows problems, only problem is I have only win98, so the winNT and 2k
won't likely happen...
---------------------------------------------------------------------------
[2000-08-21 09:16:20] jlim@natsoft.com.my
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:Inetpubwwwrootphpadodbindex.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"));
}
---------------------------------------------------------------------------
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=6275&edit=2