#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2002
    Posts
    2
    Rep Power
    0

    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.
  2. #2
  3. Big Endian
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    May 2001
    Location
    Fly-over country
    Posts
    1,172
    Rep Power
    29
    Wrong data type (integer instead of text)?
    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.
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2002
    Posts
    2
    Rep Power
    0
    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

IMN logo majestic logo threadwatch logo seochat tools logo