Throwing NumberFormat exception for preparedStatement.setObjcet()

From: Srinivas Gunnam <srinivas_gunnam(at)persistent(dot)co(dot)in>
To: "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Throwing NumberFormat exception for preparedStatement.setObjcet()
Date: 2010-01-11 12:58:02
Message-ID: 14B8F27D7CE40C4C9E481B2B845C2E0D724677A2@EXCHANGE.persistent.co.in
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hi,
In our application we are using the Postgres Sql 8.3.3 and jdbc driver is postgresql-8.0-310.jdbc3.

When I am trying to set the value for id(int) like as follows throwing exception.
ps.setObject(1, inputData,columntype);
where inputdate value is 2
if I modified the above statement like as follows then it works fine.
ps.setObject(1, inputData);
I want to know what could be the proble.

Thanks,
Srinvias

DISCLAIMER
==========
This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails.

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message dmp 2010-01-11 20:13:53 Re: Throwing NumberFormat exception for preparedStatement.setObjcet()
Previous Message Johnny Luong 2010-01-09 02:52:03 Re: issuing insert preparedstatement queries with default values