File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Oracle/OAS and the fly likes Stored procdure return multi dimensional array? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Oracle/OAS
Bookmark "Stored procdure return multi dimensional array?" Watch "Stored procdure return multi dimensional array?" New topic
Author

Stored procdure return multi dimensional array?

chelakkad ben
Ranch Hand

Joined: Feb 09, 2005
Posts: 62
Hi
How do you pass a muti dimensional array from an oracle fn/procedure to java ?
Can someone help me with an example?
rgds
Avi Abrami
Ranch Hand

Joined: Oct 11, 2000
Posts: 1132

CB,
There is sample code available from the OTN Web site.

Good Luck,
Avi.
chelakkad ben
Ranch Hand

Joined: Feb 09, 2005
Posts: 62
Hello
Thanks for the reply, Avi. But can u pl point out the link? I was not able to find what u mentioned at the site.
The problem is , i have a procedure that should query table A based on an id , sent as IN parameter. For each record (a_code) obtained ,table B is queried to obtain Seq_no and L_code .However if no record is found in table B, then table C is queried for that a_code to obtain Seq_no and L_code.
The results are put in a 2D arrary and sent back to calling Java code.
So how do you send a mutidimentional array back from the fn? and the java code to get the data in the array?

Is there a better method? Can we do using SQL?

thanks
rgds
Avi Abrami
Ranch Hand

Joined: Oct 11, 2000
Posts: 1132

CB,
Start here:

http://www.oracle.com/technology/tech/java/sqlj_jdbc/index.html

Good Luck,
Avi.
chelakkad ben
Ranch Hand

Joined: Feb 09, 2005
Posts: 62
Hello Avi
Thanks once again.
rgds
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Stored procdure return multi dimensional array?