JDBC Arrary for out parameter in Oracle

J

jacksu

I know JDBC array has been discussed a lot in the web, but seems it
still have a lot of problems.

I have a stored procedure which has two out array parameter:

procedure MYProc (
mykey IN varchar2,
myValue OUT mytable);


create or replace type mytable is table of varchar2(200);


In my java code,
stmt.registerOutParameter(2, java.sql.Types.ARRAY, "MYTABLE");

but when I tried to access MyProc, I got error:
ORA-06531: Reference to uninitialized collection

I also tried to call setArray to set a preallocated array, still got
the same error.

I also tried the typemap to put MYTABLE in the type map, seems no
use..

Any advice is highly welcome.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top