Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 966A71A4A83F for ; Tue, 15 May 2012 21:10:27 -0300 (ADT) Received: from nm40-vm2.bullet.mail.ne1.yahoo.com ([98.138.229.178]) by makus.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1SURov-0001QK-Gk for pgsql-jdbc@postgresql.org; Wed, 16 May 2012 00:10:26 +0000 Received: from [98.138.90.57] by nm40.bullet.mail.ne1.yahoo.com with NNFMP; 16 May 2012 00:10:12 -0000 Received: from [98.138.89.248] by tm10.bullet.mail.ne1.yahoo.com with NNFMP; 16 May 2012 00:10:12 -0000 Received: from [127.0.0.1] by omp1040.mail.ne1.yahoo.com with NNFMP; 16 May 2012 00:10:12 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 545720.49763.bm@omp1040.mail.ne1.yahoo.com Received: (qmail 55350 invoked by uid 60001); 16 May 2012 00:10:12 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1337127012; bh=kmFCkm6veVQfIkT+jOzF7K8bF/Mh9EA/59bdkZvQxnY=; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=yUbuT38pBB69JInqjjNP/ejv5ZgXgqnfd3JCXnVUxMJ+dXfjVMBcnAEDJAPnP7CH7MW4CAEbYdokZFbRh96xxFXDdn1SxawLiLsXCOvgYogP8Wuqwh22Oweu7kMpF8mESItnNz+IkhiOlOYnZxTUrYgm5K65QOma6b7iVOBB7Pc= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=y8J2KvodGVIq4EjraQrSLwSOEfZWZQyJZwdDxX+I66Oj7qDmzmaEqMaNEEA2w/bqznNW5NVT0jj47i/T71xkRnkqDuObsxerlJSTgqoYgpHOM6XcgQFX3u+Q9iTDC7Fh1JW/9rsvd+8Z+O6ZU9R1AJn00vcfxB9BXT9gTgXN/y4=; X-YMail-OSG: S0M2OkkVM1mfrGg5CdHvMg1w7BeuJv7vAInXyVRsjMrQN9J iXno9TxhoERSzu.5Cw1KzDleNDOaXfypove8wH.I1ZRK_8cs0E_vXwRwXfTE JCyPMmBppyv.9Tn4Gnxh6GZcA4bQ3tUnFUnY4MtnGSFB3UXb1wAhtmtmTQEh xl2aMf6CPjEyVKZVBEs5Q4CFD3NYMK0oHJ6I_k4mxlqrZvv8JQEekmUdne8x ZC.W0bP4YNqwQ6nWu7bDvB.GqBnUO5ieNREIQ6KyfRP97SuIvj63f3FOxs7S Z07Dv2yecQFgoQc_5KXEctxZAhjj3NeaeKUjNnvpkIfKmlMgoZjI7uoORhEw xU0IThTDK9paxOG_IFlyCYu9Ay.TlcP.rwPJlJsuJnAEm4ixpLaVO0rAQEyP rxkUpsaLLndllKTrQ3feuW3sn69NQCWphIkJA3XO673PruUs6Om.sjOGewgh AdI_pNv1dn3eIQQDJwtHy_uPKV4wT7lOUkwXby7ewdL33YeimDwAwnRtTy3X hvT3kHedwvDBP7ikATOGPirvqVSRQPRmR2weESJWPpNLnbHCfKpyEjPbCpQD tqsuye.C9qIXivVPuBHzQd030hgb1Xm4qC0q4NUJ5S.DBjtAFCv1TUbxXk9u z997ok4fx1W5reTqg9Xa6EQekntaGbIl_Md5F0HlBe7EmtyQxq80hd8XZnaI aMi5yflykEeZL1M6eIdfV8LAjX6Vr5I487i5uvu0tOvtdQPIr5KCYDvuHEMn JEZuh_iOVqb88_ei5UqVIc2LFgu7zc5ll8pQJAusXXtzytzFvpTf1FTx6vnk TBaysAiQHbhHt1MkwkL.Na3pvMZs5qM0tOefU.Q-- Received: from [203.166.100.228] by web121302.mail.ne1.yahoo.com via HTTP; Tue, 15 May 2012 17:10:12 PDT X-Mailer: YahooMailWebService/0.8.118.349524 References: <1333637920442-5620617.post@n5.nabble.com> <1333710841.58069.YahooMailNeo@web110406.mail.gq1.yahoo.com> <1333717349570-5622702.post@n5.nabble.com> <1337061122958-5708726.post@n5.nabble.com> <1337079586.90024.YahooMailNeo@web121302.mail.ne1.yahoo.com> <1337085975761-5708766.post@n5.nabble.com> Message-ID: <1337127012.43561.YahooMailNeo@web121302.mail.ne1.yahoo.com> Date: Tue, 15 May 2012 17:10:12 -0700 (PDT) From: Muhammad Altaf Reply-To: Muhammad Altaf Subject: Re: Re: Issues with IN-OUT parameters for Array of Objects in EDB using Java To: jonykapil , "pgsql-jdbc@postgresql.org" In-Reply-To: <1337085975761-5708766.post@n5.nabble.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="-1359746321-981286219-1337127012=:43561" X-Pg-Spam-Score: -0.8 (/) X-Archive-Number: 201205/50 X-Sequence-Number: 22950 ---1359746321-981286219-1337127012=:43561 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Use setTimestamp and no need to cast.=0A=0A-- Altaf Malik=0A=0A=0A_________= _______________________=0A From: jonykapil =0ATo: pgs= ql-jdbc@postgresql.org =0ASent: Tuesday, 15 May 2012 10:46 PM=0ASubject: [J= DBC] Re: Issues with IN-OUT parameters for Array of Objects in EDB using Ja= va=0A =0AHello Altaf,=0A=A0 =A0 =A0 Thanks for your reply.=0AI changed my c= alling code as following.=0A=0A*=0AobjCstmt =3D objConn.prepareCall("{? =3D= call SFBLPRDBILLDATA(?,?,?, cast(? as=0Atimestamp without time zone),cast(= ? as timestamp without time zone),cast(?=0Aas timestamp without time zone) = )}");=0A=0AobjCstmt.registerOutParameter(1,Types.VARCHAR);=0A=A0=A0=A0 =A0= =A0=A0 =A0 objCstmt.setInt(2,iBillDay);=0A=A0=A0=A0 =A0=A0=A0 =A0 objCstm= t.setInt(3,iBillDay);=0A=A0=A0=A0 =A0=A0=A0 =A0 objCstmt.setString(4,strBi= llFrequency);=0A=A0=A0=A0 =A0=A0=A0 =A0 objCstmt.setDate(5,dtSysDate);=0A= =A0=A0=A0 =A0=A0=A0 =A0 objCstmt.registerOutParameter(6,Types.DATE);=0A=A0= =A0=A0 =A0=A0=A0 =A0 objCstmt.registerOutParameter(7,Types.DATE);=0A=A0=A0= =A0 =A0=A0=A0 =A0 objCstmt.execute();*=0A=0A=0AException thrown by Postgre= s is ::=0A=0A*org.postgresql.util.PSQLException: ERROR: cannot cast type vo= id to=0Atimestamp without time zone=A0 Position:84*=0A=0AI am not able to u= nderstand why now it is taking registerOutParameter as=0Avoid.=0APlease hel= p me out of this...=0A=0AThanks & regards=0Ajony=0A=0A--=0AView this messag= e in context: http://postgresql.1045698.n5.nabble.com/Issues-with-IN-OUT-pa= rameters-for-Array-of-Objects-in-EDB-using-Java-tp5620617p5708766.html=0ASe= nt from the PostgreSQL - jdbc mailing list archive at Nabble.com.=0A=0A-- = =0ASent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)=0ATo make c= hanges to your subscription:=0Ahttp://www.postgresql.org/mailpref/pgsql-jdb= c ---1359746321-981286219-1337127012=:43561 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
Use setTimestamp and = no need to cast.

-- Altaf Malik

From: jonykapil <jony.kapil@gmail.com&= gt;
To: pgsql-jdbc@pos= tgresql.org
Sent: Tue= sday, 15 May 2012 10:46 PM
Subjec= t: [JDBC] Re: Issues with IN-OUT parameters for Array of Objects= in EDB using Java

Hello Altaf,
    &nb= sp; Thanks for your reply.
I changed my calling code as following.
*
objCstmt =3D objConn.prepareCall("{? =3D call SFBLPRDBILLDATA(?,?,?, cast(? as
times= tamp without time zone),cast(? as timestamp without time zone),cast(?
as= timestamp without time zone) )}");

objCstmt.registerOutParameter(1,= Types.VARCHAR);
          objCstmt.s= etInt(2,iBillDay);
          objCstm= t.setInt(3,iBillDay);
          objC= stmt.setString(4,strBillFrequency);
       = ;   objCstmt.setDate(5,dtSysDate);
      =     objCstmt.registerOutParameter(6,Types.DATE);
  =         objCstmt.registerOutParameter(7,Types.DAT= E);
          objCstmt.execute();*

Exception thrown by Postgres is ::

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

I am not able to understand why now it is t= aking 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-par= ameters-for-Array-of-Objects-in-EDB-using-Java-tp5620617p5708766.htmlSent from the PostgreSQL - jdbc mailing list archive at Nabble.com.
--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgr= esql.org)
To make changes to your subscription:
http://www.postg= resql.org/mailpref/pgsql-jdbc


<= /html> ---1359746321-981286219-1337127012=:43561--