dbTalk Databases Forums  

JDBC Interface for passign SQL Array type

comp.databases.ibm-db2 comp.databases.ibm-db2


Discuss JDBC Interface for passign SQL Array type in the comp.databases.ibm-db2 forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
esmith2112
 
Posts: n/a

Default JDBC Interface for passign SQL Array type - 06-10-2010 , 10:37 AM






I have a stored procedure that uses a user-defined data type that is
an array of VARCHAR as its input parameter. Calling the SP from the
CLP works fine:

CALL MYPROC(ARRAY['abc,'def'])

My question is how can this proc be called from within Java code? What
Java data type is required and which methods can be used to populate
the array object and bind it to the callable statement? We can't find
much documentation on the matter.

We're using DB2 v. 9.1 on AIX 5.3, and Java 1.4 type 4 driver.

Thanks for your help,

Evan

Reply With Quote
  #2  
Old   
Serge Rielau
 
Posts: n/a

Default Re: JDBC Interface for passign SQL Array type - 06-17-2010 , 10:50 AM






On 6/10/2010 10:37 AM, esmith2112 wrote:
Quote:
I have a stored procedure that uses a user-defined data type that is
an array of VARCHAR as its input parameter. Calling the SP from the
CLP works fine:

CALL MYPROC(ARRAY['abc,'def'])

My question is how can this proc be called from within Java code? What
Java data type is required and which methods can be used to populate
the array object and bind it to the callable statement? We can't find
much documentation on the matter.

We're using DB2 v. 9.1 on AIX 5.3, and Java 1.4 type 4 driver.
You mean DB2 9.5 certainly. No ARRAYs in DB2 9.1

Look here:
http://www.ibm.com/developerworks/da...m-0710arocena/

Cheers
Serge

--
Serge Rielau
SQL Architect DB2 for LUW
IBM Toronto Lab

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.