From: esmith2112 on 10 Jun 2010 10:37 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
From: Serge Rielau on 17 Jun 2010 10:50 On 6/10/2010 10:37 AM, esmith2112 wrote: > 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: www.ibm.com/developerworks/data/library/techarticle/dm-0710arocena/ Cheers Serge -- Serge Rielau SQL Architect DB2 for LUW IBM Toronto Lab
|
Pages: 1 Prev: db2 hangs with diaglevel 4 on startup if log files are deleted Next: Any gotchas for STMM |