| Author |
How to read a pl/sql table which is an OUT parameter from a stored proc from java?
|
mamata surapaneni
Greenhorn
Joined: Jul 24, 2007
Posts: 10
|
|
Hi, I have my code: CURSOR C1 IS SELECT .........; TYPE T1 is TABLE OF C1%ROWTYPE INDEX BY INTEGER; TYPE T2 IS TABLE OF T1 INDEX BY BINARY INTEGER; CREATE OR REPLACE PROCEDURE P1( OUT T2) IS {} I am trying to read T2 from my java code. How to register this OUT parameter in java code?
|
 |
vanlalhmangaiha khiangte
Ranch Hand
Joined: Sep 11, 2006
Posts: 169
|
|
You can use java.sql.Array .. you can read more about it here Suppose that input and output parameters IN_PHONE and OUT_PHONE in stored procedure GET_EMP_DATA are arrays that are defined like this: CREATE TYPE PHONENUMBERS AS VARCHAR(10) ARRAY[5] Call GET_EMP_DATA with the two parameters. Hope this helps ..
|
 |
Avi Abrami
Ranch Hand
Joined: Oct 11, 2000
Posts: 1112
|
|
Mamata, Please note that Vanlalhmangaiha's example uses a database type which is a VARRAY, whereas your example uses a PL/SQL table type. As far as I know, Vanlalhmangaiha's example does not work with PL/SQL table types. Good Luck, Avi.
|
 |
 |
|
|
subject: How to read a pl/sql table which is an OUT parameter from a stored proc from java?
|
|
|