October 22nd, 2002, 11:59 PM
ODBC Error code;How to troubleshoot
I'll keep it short and simple. When trying to update user data into an access DB I get the following error:
[Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression.
Not really sure where to start on this one, Is the mismatch somewhere in the data I am trying to update or the fields that I am updating?
If the data mismatch is in the values that I am updating what could the mismatch be? Wrong data type (integer instead of text)?
Any help would be appreciated.
October 23rd, 2002, 07:31 AM
This is most likely your problem. In your SET or WHERE clause, you have something like numeric field = string variable. Also, if your query has any date variables in these clauses, you might have to delimit them with a # at the beginning and end of the date so that Access will cast it properly (EntryDate = #10/22/02#)
If you can't solve the problem, it would help if you post the SQL you're running. Its hard to solve a programming problem without seeing the code.
October 30th, 2002, 08:56 PM
Thanks guys, I figured it out. I realized that I was not declaring the variables but rather trying to just use them strait out of the query string. Once I fixed this everything worked just fine.
Thanks for all the help