This is a discussion on How to pass more than one records from Oracle to Java? within the Oracle Database forums, part of the Database Server Software category; --> Hi, I have a specific situation where we will be passing more than one record from Oracle to Java. ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi, I have a specific situation where we will be passing more than one record from Oracle to Java. I think its not a good idea to pass everything in a single string and then convert it. We tried VARRAY, INDEXED TABLE. Both is having problem. NESTED table may be a good option, but this inturn is going to store the values in table. So to pass n records, you have to insert n records to the NESTED table and then the procedure will pick up the n records from the database. After executing the procedure, again one has to delete the contents of nested table. If anyone has experience in this esp. using VARRAY or INDEXED table to pass more than one record to Java and back, please let me know. Thanks in advance. |
| |||
| Karuna said,on 3/15/2005 12:25 PM: > Hi, I have a specific situation where we will be passing more than one > record from Oracle to Java. I think its not a good idea to pass > everything in a single string and then convert it. We tried VARRAY, > INDEXED TABLE. Both is having problem. NESTED table may be a good > option, but this inturn is going to store the values in table. So to > pass n records, you have to insert n records to the NESTED table and > then the procedure will pick up the n records from the database. After > executing the procedure, again one has to delete the contents of > nested table. If anyone has experience in this esp. using VARRAY or > INDEXED table to pass more than one record to Java and back, please > let me know. Thanks in advance. This is possible using the thick driver (oci driver) in 9i/10g. Typically you would have a plsql collection as an OUT variable in a plsql procedure and in java would map an object array to that variable and use it. OTN has a code sample too: http://www.oracle.com/technology/sam...mple.java.html Can you please be a little specific on the problem you are facing when trying to do this? Regards -- Shanmu. |