Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 37A6D1BFF919 for ; Fri, 6 Apr 2012 08:14:18 -0300 (ADT) Received: from nm28.bullet.mail.sp2.yahoo.com ([98.139.91.98]) by magus.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1SG77Q-0004QJ-7D for pgsql-jdbc@postgresql.org; Fri, 06 Apr 2012 11:14:18 +0000 Received: from [98.139.91.66] by nm28.bullet.mail.sp2.yahoo.com with NNFMP; 06 Apr 2012 11:14:02 -0000 Received: from [98.139.91.40] by tm6.bullet.mail.sp2.yahoo.com with NNFMP; 06 Apr 2012 11:14:02 -0000 Received: from [127.0.0.1] by omp1040.mail.sp2.yahoo.com with NNFMP; 06 Apr 2012 11:14:02 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 241294.89605.bm@omp1040.mail.sp2.yahoo.com Received: (qmail 58767 invoked by uid 60001); 6 Apr 2012 11:14:02 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1333710841; bh=M2opoGxhR035hvqFxWW1VmcfFdZ/0/TRn6fO17EJEi8=; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=6XLFtjui5olqNoLEELswZ/9QlQ2ybnLEqcQ7CC4b2ldyAgj5m8LlxBGeL/5fc6XESc5LILTtoJF8XTJXDs7R7zsuGJ1K7nnUsjuV6Ml2rTMXTwFb6hNhtOovfLLZOhFkuDk/0h47MQyKkIQyutX4s+3+JJDDxlrGXMXzBM+UalE= 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=gYD8nxZs37FFvfPIrLAIhdnEsmFjJVFO9vBy42Y+OK4icq2J2y7Ty/9QMLhJbmKNZq9dmnUbjFokKgG91DxCe3myhNbrMYaZAuyslhJM/+IMs3EDdmURv0rJPE0vm8hGNDA6Al4pxgMdSeN8FV8NahIVQt8VTJ6nUMB+fxvHsbI=; X-YMail-OSG: g1byyPEVM1lC5ujjXxJ0lvk4Ssrt.ouYh2mMA8HV7xFyEKC o0p2H2xdvzOQOFMqYchgFzPPdfXJD458AkmGPNHtjkCA5PHau9DCQXJrXyZG mdEQ4mseyqbkWdOKeIZkwugC9zbV6tJxdc.7_UoaPkj2MUoqztQK79eivseG u8TdGALg3is1ASBq_qVEmB9S1s.gqWYd2DIYNwKhEO3kAk07Q17C0OLKtZR0 3_irvWaoQkxxKy9YMh5DlzwandjiC8wSp1PQnArsEOOemycK89lVqDeIB3RR Abq5BKHO97lp93oC4S_BN9d3vSh24j4wxz__SH5jXiyreLV430J6XWRsw0Z9 gw49z_qKPZCRio.NU466.1zScB1oCl3pFmW5apIDhHnz08hTuGv1QStMWQvi IR8zKgZ924G7gU50GKKPfukeYRv5CAOqFjZ2bUwTN5eREW5hTiJktK4WwV9e fpH.kP.eDmuj7acEFgjhxS31J3ncMM_AoOObHadHDHM2Q.PLDYz_HT9tpIfT VyDNEAokfXdGZtFwuOnPLPWFmck2Yh2mMNRZ78Sau4vxQ8CMDLvT42Q.lpb6 jIWGxFsqepAtnwA6iSFXuxdpnDhJK6gn5QXMINT7qNQ6Cyx5UiE_txO6Mgst 5bxmB7GLlxnMUzGHZ8qf6VUvm0o8Ju0ai7nnZdzBItsOv90y7bl9jYDY0Fk0 qmPwwbYRaR_3kQUNZbQ3_GmNIjFY2KyJqj5hz_oVHY8Bu2mdzOg8jHOrmMq0 Y7LYToqWPHDdaxx2RsgNVEfo0bwl2fTt40yjKd2sonIZMLVn2MuFX45WEzSI 3ozjdrL0lvQYS5Q-- Received: from [110.175.18.253] by web110406.mail.gq1.yahoo.com via HTTP; Fri, 06 Apr 2012 04:14:01 PDT X-Mailer: YahooMailWebService/0.8.117.340979 References: <1333637920442-5620617.post@n5.nabble.com> Message-ID: <1333710841.58069.YahooMailNeo@web110406.mail.gq1.yahoo.com> Date: Fri, 6 Apr 2012 04:14:01 -0700 (PDT) From: Muhammad Altaf Reply-To: Muhammad Altaf Subject: Re: Issues with IN-OUT parameters for Array of Objects in EDB using Java To: cognizant , "pgsql-jdbc@postgresql.org" In-Reply-To: <1333637920442-5620617.post@n5.nabble.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="-1771551033-1090268067-1333710841=:58069" X-Pg-Spam-Score: -0.9 (/) X-Archive-Number: 201204/13 X-Sequence-Number: 22813 ---1771551033-1090268067-1333710841=:58069 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable UDTs are not yet supported in JDBC driver (using java.sql.Struct or SQLData= )=0A=0A=A0-- Altaf Malik=0A=0A=0A=0A=0A________________________________=0A = From: cognizant =0ATo: pgsql-jdbc@postgresql.org = =0ASent: Friday, 6 April 2012 12:58 AM=0ASubject: [JDBC] Issues with IN-OUT= parameters for Array of Objects in EDB using Java=0A =0AHi =0A=0AI am havi= ng issues with passing IN-OUT Parameters from a function which=0Areturns a = array of custom defined objects. I know that the new version(8.X+)=0Aof EDB= support nested tables and so was wondering this issue must be faced=0Aby o= ther java developers when trying to use the nested tables. Note I tried=0At= ypes.Other, Array and STRUCT to register the output nested table object but= =0Adidnot work.=0A=0A*Below is my SQL code*=0A=0Acreate or replace=0ATYPE O= T_Ref_Country AS OBJECT (=0A=A0 =A0 countryId=A0 =A0 =A0 =A0=A0=A0 =A0=A0= =A0 Integer,=0A=A0 =A0 isoFullName=A0 =A0 =A0=A0=A0 Varchar2(256),=0A=A0 = =A0 doNotUseIndicator=A0 =A0 =A0=A0=A0 Integer=0A);=0A=0Acreate or replace= =0ATYPE NT_Ref_Countries IS TABLE OF OT_Ref_Country;=0A=0AFUNCTION getCount= ryList ( ip_countryId IN=0ARef_Country.countryid%TYPE,iop_NT_Ref_Countries = in out NT_Ref_Countries=0A) RETURN Number ;=0A=0A=0A*Java code:*=0A=0ACalla= bleStatement=A0 st =3D con.prepareCall("{call=0Apkg_ref_geography_mgr.getCo= untryList(4,?)}");=0Ast.registerOutParameter(1,Types.OTHER);=0Ast.execute()= ;=0A=0A=0APlease let me know if any additional details are needed. The vers= ion used is=0APostgresql 8.4 with Java6=0A=0ATks for the help=0A-Mike=0A=0A= --=0AView this message in context: http://postgresql.1045698.n5.nabble.com/= Issues-with-IN-OUT-parameters-for-Array-of-Objects-in-EDB-using-Java-tp5620= 617p5620617.html=0ASent from the PostgreSQL - jdbc mailing list archive at = Nabble.com.=0A=0A-- =0ASent via pgsql-jdbc mailing list (pgsql-jdbc@postgre= sql.org)=0ATo make changes to your subscription:=0Ahttp://www.postgresql.or= g/mailpref/pgsql-jdbc ---1771551033-1090268067-1333710841=:58069 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
UDTs are n= ot yet supported in JDBC driver (using java.sql.Struct or SQLData)
 
-- Altaf Malik



From: cognizant <sudipbajoria@gmail.com>
To: pgsql-jdbc@postgresql.org
Sent: Friday, 6 April 2012 12:58 AM Subject: [JDBC] Issues = with IN-OUT parameters for Array of Objects in EDB using Java

H= i

I am having issues with passing IN-OUT Parameters from a function= which
returns a array of custom defined objects. I know that the new ve= rsion(8.X+)
of EDB support nested tables and so was wondering this issue= must be faced
by other java developers when trying to use the nested ta= bles. Note I tried
types.Other, Array and STRUCT to register the output = nested table object but
didnot work.

*Below is my SQL code*
create or replace
TYPE OT_Ref_Country AS OBJECT (
    cou= ntryId              Integer,<= br>    isoFullName        Varchar2(256)= ,
    doNotUseIndicator        Intege= r
);

create or replace
TYPE NT_Ref_Countries IS TABLE OF OT_Re= f_Country;

FUNCTION getCountryList ( ip_countryId IN
Ref_Country.countryid%TYPE,iop_NT_Ref_Countries in out NT_Ref_Countr= ies
) RETURN Number ;


*Java code:*

CallableStatement&n= bsp; st =3D con.prepareCall("{call
pkg_ref_geography_mgr.getCountryList(= 4,?)}");
st.registerOutParameter(1,Types.OTHER);
st.execute();

Please let me know if any additional details are needed. The version u= sed is
Postgresql 8.4 with Java6

Tks for the help
-Mike
--
View this message in context: http://postgresql.1045698.= n5.nabble.com/Issues-with-IN-OUT-parameters-for-Array-of-Objects-in-EDB-usi= ng-Java-tp5620617p5620617.html
Sent from the PostgreSQL - jdbc maili= ng list archive at Nabble.com.

--
Sent via pgsql-jdbc mailing li= st (pgsql-jdbc@postgresql.org)To make changes to your subscription:
http://www.postgresql.org/mailp= ref/pgsql-jdbc


---1771551033-1090268067-1333710841=:58069--