Click here to Skip to main content
15,919,479 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hey, anybody know this,

My query is simple just a simple "SELECT QUERY", but i encounter a problem that i had never encounter before. Every time i put a condition(Where Clause) in my select statement it will definitely pop an error message says that : "Data type mismatch in criteria expression."

Any idea will be appreciated...Thanks.
Posted

1 solution

What that implies is that your query - that you don't tell us - is trying to compare two items which are not related: for example if the database field you are comparing is DateTime and the value you are trying to compare against is Bool.

A sample would be (assuming you have an integer column called "id" in a table called "myTable":
SQL
SELECT * FROM myTable WHERE id=17
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900