aspose file tools
The moose likes JDBC and the fly likes java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Data type mismatch i Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Data type mismatch i" Watch "java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Data type mismatch i" New topic
Author

java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Data type mismatch i

smyle khanna
Ranch Hand

Joined: Jan 14, 2004
Posts: 54
i have developed a program tht generated a random number n later with those
numbers i have 2 retrieve the data matchin those numbers from database but its givin the exception when i run the program:
java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression.

how 2 resolve this problem
thanks in advance
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8265

Originally posted by smyle khanna:

ResultSet rs=stat.executeQuery("Select * from VBques where QuestionNo='ranNumbers'");

If QuestionNo is a numeric data type you should not quote the value you are searching for in the query. The quotes make the value CHAR or VARCHAR.
[ February 03, 2004: Message edited by: Joe Ess ]

"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Data type mismatch i
 
Similar Threads
In Dire Need of Data Structure Advice
Invalid column type
How to connect Driver
Math.random().....any formula to adjust required range?
problem base64 encoding the 3 hex bytes E2 80 A9