Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id A8FD1125101 for ; Tue, 15 May 2012 08:00:06 -0300 (ADT) Received: from nm4.bullet.mail.ne1.yahoo.com ([98.138.90.67]) by magus.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1SUFU0-0000sy-5z for pgsql-jdbc@postgresql.org; Tue, 15 May 2012 11:00:05 +0000 Received: from [98.138.90.49] by nm4.bullet.mail.ne1.yahoo.com with NNFMP; 15 May 2012 10:59:46 -0000 Received: from [98.138.89.166] by tm2.bullet.mail.ne1.yahoo.com with NNFMP; 15 May 2012 10:59:46 -0000 Received: from [127.0.0.1] by omp1022.mail.ne1.yahoo.com with NNFMP; 15 May 2012 10:59:46 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 283433.38211.bm@omp1022.mail.ne1.yahoo.com Received: (qmail 90629 invoked by uid 60001); 15 May 2012 10:59:46 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1337079586; bh=d4TyTOzx5VqQgcJKKl+AZidUs3tw0YTuwU4sYFKVkkg=; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=MHWzmHxdVCcFuqGjPBW8LUctbbEowlx3yFKT8BtkJO7DosHaatL+qCkOp5aDwdD4qR0ac8eq/dkirQKsOOpMSFS+3l9yuwH/0eSniQ0qzxr12ZzIeu9ihL7x2WwZeNLkQYluNN8JHxOXU5HQvbo22UsddtzNKblmGkKKistYxoc= 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=nPUgw2MeL/Z+HFqY0rRV13fLcAB3urzXsYpCcLWiH96KeomIz+92XzQWOZb1OT6dDKZtxJDn3aFSwzXT3xMQcIeQWdD7B2x9EZpFo/SlAoT5RMppdH/F+PMgoYt+eQ9PfSl+n+ih7klS7oYPMmI65gI7nHpPd+NZeusGBe1J1t8=; X-YMail-OSG: odIX0qoVM1kc3Tp7ldI6hfHK6NaGAxFP7QtL1OvJD3.eUHy pytpyukighBgTgUSFAHLclfLW3XIjSq5XaglspmoIxONAt6YqaMXa3SeEfpv zVTkdyf8zzqdmfLbE6zbyC0uvYTnt9MScUJrGGFgW3YKvlvCCy0gYpsKWMd5 hiBz2N4JdYs5py1N2cd0KhtjpwGx9WSf8fEWtym4NrXo0j5uksLypYAU6str pW_EkbQo3JQxsrAhkUkEZIKDwFTsYv.3QjzuFKeusfjRFormZMGr7f6mx2U6 tUSjhvFX3Lqzyw4cT6VtAsIfxLKb2UhdS11wPuwrKLmn3coXSfMVCFXe7erT 5Y9MXCMiUAhrVUs8pkw7vfwbe4Ek.wBWlwR4wsPtvfFMQKUwP0hGRxesJBYO DRRjw9EdofqlxlPpsU_H5evYOokXgX4C9B09BaLdHagXIrIyKOXatKHmoWEC 1yNo4Eg0ArGxql0W3Jto.9LakPYxVC0W642m4HoXCXV6UrabL3IrLLWSmziT CeG19qUwaGgd7bNKEtof0yjfkbkbDmo5mfdQTg4zmlBUt9xUxy0ak0hR6Z3Q G.hH9jjTndu1NNRpJOO8xcbbIKK5eaYkmCeoVaC2KeRruZTsQ1qu1J90AFHM SAcyqyEEhJCGVOFOlgEGCbhWbApeboIa1X83gKHk1wizg7Wm36FBvARWca_E GLESXCwdcN5TmGSa7aC40REvHjPgt1jvwxtYwVKjj5y_BjiADM9iIdKBfiES M3ahwSzcG8GUuHMcIkebMFQzfSvaBgIXVyvMv9EkwYeVzlqZfbL0aW5FqddQ qFXKkeLOqMyZ1PH3jFqQb.JUsLbU9115x843k Received: from [110.175.18.253] by web121302.mail.ne1.yahoo.com via HTTP; Tue, 15 May 2012 03:59:46 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> Message-ID: <1337079586.90024.YahooMailNeo@web121302.mail.ne1.yahoo.com> Date: Tue, 15 May 2012 03:59:46 -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: <1337061122958-5708726.post@n5.nabble.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="-1359746321-1196011166-1337079586=:90024" X-Pg-Spam-Score: -0.9 (/) X-Archive-Number: 201205/47 X-Sequence-Number: 22947 ---1359746321-1196011166-1337079586=:90024 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Can you change strSql=3D"{? =3D call(SFBLPRDBILLDATE(?,?,?,?,?,?))}"; to st= rSql=3D"{? =3D call SFBLPRDBILLDATE(?,?,?,?,?,?)}"; =0A=A0Kind Regards=0AAl= taf Malik=0A=0A=0A________________________________=0A From: jonykapil =0ATo: pgsql-jdbc@postgresql.org =0ASent: Tuesday, 15 May = 2012 3:52 PM=0ASubject: [JDBC] Re: Issues with IN-OUT parameters for Array = of Objects in EDB using Java=0A =0AHi, This is my first post on the forum. = Hope, I'll get a resolution to my=0Aproblem. =0A=0AWe are in process of mig= ration from Oracle 10g to Postgres9.1 Advance=0AServer. The stored procedur= es/functions from Oracle have some parameters=0Aregistered as Out parameter= s. Now, when we call it from Java, an exception=0Athrown -: =0A=0A*org.post= gresql.util.PSQLException: Malformed function or procedure escape=0Asyntax = at offset 9.*=0A=0AThe signature of Postgres Function is as :: =0A=0A*sfblp= rdbilldate(IN p_billdate numeric, IN p_cutoffday numeric, IN=0Ap_billfreq c= haracter varying, IN p_givendate timestamp without time zone,=0AOUT po_star= tdate timestamp without time zone, OUT po_end_date timestamp=0Awithout time= zone)*=0A=0A=0AJava code for calling this function is as follows :: =0A=0A= =A0 *strSql=3D"{? =3D call(SFBLPRDBILLDATE(?,?,?,?,?,?))}"; =0A=0A=A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 objCstmt =3D objConn.prepareCall(strSql); =0A= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 objCstmt.registerOutParameter(1,Types.= VARCHAR); =0A=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 objCstmt.setInt(2,iBillDa= y); =0A=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 objCstmt.setInt(3,iBillDay); = =0A=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 objCstmt.setString(4,strBillFrequen= cy); =0A=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 objCstmt.setDate(5,dtSysDate);= =0A=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 objCstmt.registerOutParameter(6,Ty= pes.DATE); =0A=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 objCstmt.registerOutPara= meter(7,Types.DATE); =0A=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 objCstmt.execu= te(); =0A=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 strBillPeriod =3D objCstmt.ge= tString(1); =0A=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 dtStartDate=A0 =3D obj= Cstmt.getDate(6);*Anybody, who has=0Aresolved this sort of issue, please he= lp me as this is in numbers in our=0Acode and we are looking for a solutuin= to this problem. =0A=0AThanks =0AJony.=0A=0A--=0AView this message in cont= ext: http://postgresql.1045698.n5.nabble.com/Issues-with-IN-OUT-parameters-= for-Array-of-Objects-in-EDB-using-Java-tp5620617p5708726.html=0ASent from t= he PostgreSQL - jdbc mailing list archive at Nabble.com.=0A=0A-- =0ASent vi= a pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)=0ATo make changes to = your subscription:=0Ahttp://www.postgresql.org/mailpref/pgsql-jdbc ---1359746321-1196011166-1337079586=:90024 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
Can you ch= ange strSql=3D"{? =3D call(SFBLPRDBILLDATE(?,?,?,?,?,?))}"; to strSq= l=3D"{? =3D call SFBLPRDBILLDATE(?,?,?,?,?,?)}";
 
Kin= d Regards
Altaf Malik<= span style=3D"text-decoration:underline;">

From: jonykapil <jony.kapil@g= mail.com>
To: pgsql= -jdbc@postgresql.org
Sent: Tuesday, 15 May 2012 3:52 PM

        =           objCstmt =3D objConn.prepareCall(strSql= );
                  objC= stmt.registerOutParameter(1,Types.VARCHAR);
       =           objCstmt.setInt(2,iBillDay);
 = ;                 objCstmt.setInt(= 3,iBillDay);
                &n= bsp; objCstmt.setString(4,strBillFrequency);
      &nbs= p;           objCstmt.setDate(5,dtSysDate);
&= nbsp;                 objCstmt.reg= isterOutParameter(6,Types.DATE);
          &nb= sp;       objCstmt.registerOutParameter(7,Types.DATE);
=                  =20 objCstmt.execute();
              &= nbsp;   strBillPeriod =3D objCstmt.getString(1);
    &n= bsp;             dtStartDate  =3D objC= stmt.getDate(6);*Anybody, who has
resolved this sort of issue, please he= lp me as this is in numbers in our
code and we are looking for a solutui= n to this problem.

Thanks
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-tp5620617p5708726= .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/mailp= ref/pgsql-jdbc


---1359746321-1196011166-1337079586=:90024--