This is a discussion on array in db2 using Java within the DB2 forums, part of the Database Server Software category; --> Hi, Currently I am embarked on a project that requires me to define and pass array to stored procedure, ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi, Currently I am embarked on a project that requires me to define and pass array to stored procedure, and I found out that there is no direct way to do this. I wonder if a combination of UDF and java code should be able to accomplish this. Has anyone accomplish this before? Maybe someone can share the best way to accomplish this. I am using DB2 8.1. I am sure someone has done it before, I just need a guideline how to do this best. Aaron. |
| |||
| aaron80v@yahoo.com.au wrote: > > Hi, > > Currently I am embarked on a project that requires me to define and > pass array to stored procedure, and I found out that there is no > direct way to do this. I wonder if a combination of UDF and java code > should be able to accomplish this. Has anyone accomplish this before? > Maybe someone can share the best way to accomplish this. I am using > DB2 8.1. I am sure someone has done it before, I just need a guideline > how to do this best. No clue what you really want to do. But you could simply write the data into a table, call the procedure and the procedure reads from the table. The table can be a temp table. -- Knut Stolze DB2 z/OS Utilities Development IBM Germany |
| |||
| On Apr 12, 1:31 am, Knut Stolze <sto...@de.ibm.com> wrote: > aaron...@yahoo.com.au wrote: > > > Hi, > > > Currently I am embarked on a project that requires me to define and > > pass array to stored procedure, and I found out that there is no > > direct way to do this. I wonder if a combination of UDF and java code > > should be able to accomplish this. Has anyone accomplish this before? > > Maybe someone can share the best way to accomplish this. I am using > > DB2 8.1. I am sure someone has done it before, I just need a guideline > > how to do this best. > > No clue what you really want to do. But you could simply write the data > into a table, call the procedure and the procedure reads from the table. > The table can be a temp table. > > -- > Knut Stolze > DB2 z/OS Utilities Development > IBM Germany My intention is simple. The workaround using temp table is not an option. What I need is to be able to define an array in Java, get the resultset and store it in array and pass this array on to stored procedure. Isn't there any JDBC side API catered for this? I have been doing varray (Oracle) all the while and would like to mimic the same functionality in DB2. We have Java folks but we are not totally familiar with DB2. So any guide will be appreciated. Aaron. |
| |||
| aaron80v@yahoo.com.au wrote: > On Apr 12, 1:31 am, Knut Stolze <sto...@de.ibm.com> wrote: >> aaron...@yahoo.com.au wrote: >> >>> Hi, >>> Currently I am embarked on a project that requires me to define and >>> pass array to stored procedure, and I found out that there is no >>> direct way to do this. I wonder if a combination of UDF and java code >>> should be able to accomplish this. Has anyone accomplish this before? >>> Maybe someone can share the best way to accomplish this. I am using >>> DB2 8.1. I am sure someone has done it before, I just need a guideline >>> how to do this best. >> No clue what you really want to do. But you could simply write the data >> into a table, call the procedure and the procedure reads from the table. >> The table can be a temp table. >> >> -- >> Knut Stolze >> DB2 z/OS Utilities Development >> IBM Germany > > My intention is simple. The workaround using temp table is not an > option. What I need is to be able to define an array in Java, get the > resultset and store it in array and pass this array on to stored > procedure. Isn't there any JDBC side API catered for this? I have been > doing varray (Oracle) all the while and would like to mimic the same > functionality in DB2. We have Java folks but we are not totally > familiar with DB2. So any guide will be appreciated. > > Aaron. > Aaron, did you get may email? Cheers Serge -- Serge Rielau DB2 Solutions Development IBM Toronto Lab |
| ||||
| On Apr 13, 12:05 am, Serge Rielau <srie...@ca.ibm.com> wrote: > aaron...@yahoo.com.au wrote: > > On Apr 12, 1:31 am, Knut Stolze <sto...@de.ibm.com> wrote: > >> aaron...@yahoo.com.au wrote: > > >>> Hi, > >>> Currently I am embarked on a project that requires me to define and > >>> pass array to stored procedure, and I found out that there is no > >>> direct way to do this. I wonder if a combination of UDF and java code > >>> should be able to accomplish this. Has anyone accomplish this before? > >>> Maybe someone can share the best way to accomplish this. I am using > >>> DB2 8.1. I am sure someone has done it before, I just need a guideline > >>> how to do this best. > >> No clue what you really want to do. But you could simply write the data > >> into a table, call the procedure and the procedure reads from the table. > >> The table can be a temp table. > > >> -- > >> Knut Stolze > >> DB2 z/OS Utilities Development > >> IBM Germany > > > My intention is simple. The workaround using temp table is not an > > option. What I need is to be able to define an array in Java, get the > > resultset and store it in array and pass this array on to stored > > procedure. Isn't there any JDBC side API catered for this? I have been > > doing varray (Oracle) all the while and would like to mimic the same > > functionality in DB2. We have Java folks but we are not totally > > familiar with DB2. So any guide will be appreciated. > > > Aaron. > > Aaron, did you get may email? > > Cheers > Serge > > -- > Serge Rielau > DB2 Solutions Development > IBM Toronto Lab Yes I did. Thanks. Aaron |
| Thread Tools | |
| Display Modes | |
|
|