Yikes. This is killing me. I'm a newbie and I am modifying the instructions in the article here on phpbuilder to fit my situation. Here is my code:
// send a simple odbc query . returns an odbc cursor
$cur= odbc_exec( $cnx, "select client,contact,address1,address2,city,state,zip,phone,fax,email from clients" );
if (!$cur) {
Error_handler( "Error in odbc_exec( no cursor returned ) " , $cnx );
}
echo "<table border=1><tr><th>Client</th><th>Contact</th><th>Address1</th>".
"<th>Address2</th><th>City</th><th>State</th><th>Zip</th><th>Phone</th>".
"<th>Fax</th><th>Email</th>";
Line 34 is the top line and I am getting this error:
Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 2., SQL state 07001 in SQLExecDirect in C:\httpd\HTDOCS\clientsdata.php on line 34
Error in odbc_exec( no cursor returned )
What am I doing wrong?
Sketch
// send a simple odbc query . returns an odbc cursor
$cur= odbc_exec( $cnx, "select client,contact,address1,address2,city,state,zip,phone,fax,email from clients" );
if (!$cur) {
Error_handler( "Error in odbc_exec( no cursor returned ) " , $cnx );
}
echo "<table border=1><tr><th>Client</th><th>Contact</th><th>Address1</th>".
"<th>Address2</th><th>City</th><th>State</th><th>Zip</th><th>Phone</th>".
"<th>Fax</th><th>Email</th>";
Line 34 is the top line and I am getting this error:
Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 2., SQL state 07001 in SQLExecDirect in C:\httpd\HTDOCS\clientsdata.php on line 34
Error in odbc_exec( no cursor returned )
What am I doing wrong?
Sketch