Re: Re: Issues with IN-OUT parameters for Array of Objects in EDB using Java

Поиск
Список
Период
Сортировка
От Muhammad Altaf
Тема Re: Re: Issues with IN-OUT parameters for Array of Objects in EDB using Java
Дата
Msg-id 1337127012.43561.YahooMailNeo@web121302.mail.ne1.yahoo.com
обсуждение исходный текст
Ответ на Re: Issues with IN-OUT parameters for Array of Objects in EDB using Java  (jonykapil <jony.kapil@gmail.com>)
Список pgsql-jdbc
Use setTimestamp and no need to cast.

-- Altaf Malik

From: jonykapil <jony.kapil@gmail.com>
To: pgsql-jdbc@postgresql.org
Sent: Tuesday, 15 May 2012 10:46 PM
Subject: [JDBC] Re: Issues with IN-OUT parameters for Array of Objects in EDB using Java

Hello Altaf,
      Thanks for your reply.
I changed my calling code as following.

*
objCstmt = objConn.prepareCall("{? = call SFBLPRDBILLDATA(?,?,?, cast(? as
timestamp without time zone),cast(? as timestamp without time zone),cast(?
as timestamp without time zone) )}");

objCstmt.registerOutParameter(1,Types.VARCHAR);
          objCstmt.setInt(2,iBillDay);
          objCstmt.setInt(3,iBillDay);
          objCstmt.setString(4,strBillFrequency);
          objCstmt.setDate(5,dtSysDate);
          objCstmt.registerOutParameter(6,Types.DATE);
          objCstmt.registerOutParameter(7,Types.DATE);
          objCstmt.execute();*


Exception thrown by Postgres is ::

*org.postgresql.util.PSQLException: ERROR: cannot cast type void to
timestamp without time zone  Position:84*

I am not able to understand why now it is taking registerOutParameter as
void.
Please help me out of this...

Thanks & regards
jony

--
View this message in context: http://postgresql.1045698.n5.nabble.com/Issues-with-IN-OUT-parameters-for-Array-of-Objects-in-EDB-using-Java-tp5620617p5708766.html
Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.

--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc


В списке pgsql-jdbc по дате отправления:

Предыдущее
От: "Maciek Sakrejda (msakrejd)"
Дата:
Сообщение: Re: Fwd: Cannot pass null in Parameter in Query for ISNULL
Следующее
От: Jesper Pedersen
Дата:
Сообщение: Pull request: Use .valueOf()