Dear gurus, I am having trouble in converting an object to an integer. The object actually is an item from a Jcombobox and i need to compare it against a field that has been declared as a number in the database. I received the following error: "java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression." I have tried casting it to an integer but to no avail. Any help would be really appreciated. Thanks!
Joined: Jul 17, 2001
Let's see your query, and the relevant section of code where this is happening.
Joined: Jan 06, 2001
As long as you did not post any code I�m gonna make somme assumptions: lets supose you have a String object and you�re sure that it has an integer value you coul�d use ex(suppose you�ve recover the String value from your combo): String s = "244"; Integer integer = new Integer(s); int i = integer.intValue(); regards.