N
Nathan Sokalski
I am doing a database query in Java, and it seems to work fine using any of
the fields except for the date. I am assuming that this has something to do
with my syntax, since the DATE type has the most complicated syntax. My
query looks like the following:
SELECT * FROM Employee WHERE BDATE='4/20/1981'
BDATE is the field name, which is obviously of type DATE, and the error I
recieve is:
java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Data type
mismatch in criteria expression.
I am assuming that when it says "Data type mismatch" it is interpreting
'4/20/1981' as a string. But because that is the format I used in the INSERT
statements when I added the records to the table. If this is the problem,
what should my query string? Thanks.
the fields except for the date. I am assuming that this has something to do
with my syntax, since the DATE type has the most complicated syntax. My
query looks like the following:
SELECT * FROM Employee WHERE BDATE='4/20/1981'
BDATE is the field name, which is obviously of type DATE, and the error I
recieve is:
java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Data type
mismatch in criteria expression.
I am assuming that when it says "Data type mismatch" it is interpreting
'4/20/1981' as a string. But because that is the format I used in the INSERT
statements when I added the records to the table. If this is the problem,
what should my query string? Thanks.