Thank you Tim, it works well.

Merry Christmas
Sylvain

-----Message d'origine-----
De: Gibbs, Tim [mailto:[EMAIL PROTECTED]]
Date: mardi, 24. d�cembre 2002 15:38
�: 'OJB Users List'
Objet: RE: [PB] query to integer field




try

crit.addEqualTo("number",new Integer(1));

My guess is that because the underlying field is an integer there is a cast
somewhere that is trying to cast what you have given to an Integer. 

--------------------------------------------
Tim Gibbs
RBC Capital Markets
Phone: (416) 842-4663
E-Mail: [EMAIL PROTECTED]


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 24, 2002 8:35 AM
To: [EMAIL PROTECTED]
Subject: [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 

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


<font face="Times New Roman" size="3">
<p>------------------------------------------------------------------------------</p>
<p> This e-mail may be privileged and/or confidential, and the sender does not waive 
any related rights and obligations. Any distribution, use or copying of this e-mail or 
the information it contains by other than an intended recipient is unauthorized. If 
you received this e-mail in error, please advise me (by return e-mail or otherwise) 
immediately.</p>
<p> Ce courriel est confidentiel et prot�g�. L'exp�diteur ne renonce pas aux droits et 
obligations qui s'y rapportent. Toute diffusion, utilisation ou copie de ce message ou 
des renseignements qu'il contient par une personne autre que le (les) destinataire(s) 
d�sign�(s) est interdite. Si vous recevez ce courriel par erreur, veuillez m'en aviser 
imm�diatement, par retour de courriel ou par un autre moyen.</p>
<p>====================================================</p>
</font>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to