Forum Moderators: coopster
$cnx = odbc_connect( 'test' , '', '');
if (!$cnx) {
Error_handler( odbc_errormsg() , $cnx );
}
$SQL_Exec_String = "Delete From People Where ID = '$id'";
$cur= odbc_exec( $cnx, $SQL_Exec_String );
if (!$cur) {
Error_handler( odbc_errormsg() , $cnx );
}
odbc_close( $cnx);
but it does not work...i get an error message saying:
"[Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression."
you have:
$SQL_Exec_String = "Delete From People Where ID = '$id'";since $id is in single quotes access thinks you are giving it a character variable instead of a numeric one like it is in the database. Hence type mismatch.
try:
$SQL_Exec_String = "Delete From People Where ID = $id";
this seggestion seemed to work.
Anyway, I have more details in that thread [webmasterworld.com] and would certainly welcome any insight anyone might have.
Tom