You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Sy...@swisscom.com on 2002/12/24 14:34:58 UTC

[PB] query to integer field

Hello,

I have a query like this:
Criteria crit = new Criteria();
crit.addEqualTo("number", "1");

The number field is an INTEGER.

My code outputs this error:
java.lang.ClassCastException: java.lang.String
	at net.sourceforge.jtds.jdbc.PreparedStatement_base.setObject(Unknown Source)
	at net.sourceforge.jtds.jdbc.PreparedStatement_base.setObject(Unknown Source)



How to do a query to an INTEGER value?

Thank you
Merry Christmas
Sylvain