john
Posts: 10
Nickname: swing
Registered: Jul, 2002
|
|
Re: Data type mismatch in criteria expression?
|
Posted: Jul 13, 2002 2:18 PM
|
|
Still working on that damn codes. got really frustrated. Hope someone would help me out.
Let me state the problem again. the table has 3 columns
column data type ID AutoNumber AssemblyPN Text PartNo Number
I use JTextField to get user input, then do query.
Here are codes for the query part.
String query = "SELECT * FROM Assembly" + " WHERE AssemblyPN = " + aPanel.AssemblyPN.getText() ; ResultSet rs = st.executeQuery(query);
The above codes don't work, got run time error message "Data type mismatch in criteria expression"
but if change codes as: String query = "SELECT * FROM Assembly" + " WHERE ID = " + aPanel.AssemblyID.getText() ; ResultSet rs = st.executeQuery(query);
the codes work. I just don't understand why
" WHERE AssemblyPN = " + aPanel.AssemblyPN.getText()..
doesn't work!!!!!
|
|