Hi there,

I'm attempting to execute prepared statements with parameters against an
Access 97 database, and am having some trouble.  I'm sure I'm missing
something really obvious, but I just can't see it, and I'm hoping someone
out there can help.

In the following code, assume that $connection holds a valid and otherwise
working connection to a database in which there exists a table named
System.  Column A is a text column.

$statement = odbc_prepare( $connection, "select * from System where A=?" );
if( odbc_execute( $statement, array( "MachineID" )))
{
  odbc_fetch_row( $statement );
  print odbc_result( $statement, "A" ) . "<br/>";
}


I have tried many variations on this code, and if there are any ? marks in
the query, regardless what I pass as the second parameter to
odbc_execute(), odbc_execute() always dies with the following message:

Warning:  SQL error: [Microsoft][ODBC Microsoft Access Driver]COUNT field
incorrect , SQL state 07001 in SQLExecute in ...


Can anyone tell me what I'm doing wrong?

Thanks, Chris.



-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to