Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

data type mismatch error - need help please!

843854May 13 2003 — edited May 13 2003
Hi there, i am trying the following query to extract a specific date and idno from a database. I keep getting the error message: "data type mismatch in criteria expression". I'm not sure why i am getting this error. Please help. Thanks a lot

String a = victSnameTxt.getText().trim();
String b = victFnameTxt.getText().trim();

String query = "SELECT VSurname, VFirstName, VDateOfBirth, OSurname, OFirstName, ODateOfBirth, IdNo, IDate, CollarNo, OffName FROM CompleteIncidents WHERE IdNo = '" + a + "' AND IDate = '" + b + "' ";

ResultSet rs = stmt.executeQuery(query);
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 10 2003
Added on May 13 2003
2 comments
156 views