| Author |
OUT as Table in StoreProcedure
|
Prashant Saraf
Ranch Hand
Joined: Sep 25, 2006
Posts: 50
|
|
Hi,
I have an oracle store procedure which return TABLE RECORD
here is procedure
I want to know how to read OUT of above procedure.
Thanks
|
 |
Jan Cumps
Bartender
Joined: Dec 20, 2006
Posts: 2343
|
|
|
Do you want to know how to read this OUT parameter in Java, with JDBC?
|
OCUP UML fundamental
ITIL foundation
|
 |
Prashant Saraf
Ranch Hand
Joined: Sep 25, 2006
Posts: 50
|
|
Jan Cumps wrote:Do you want to know how to read this OUT parameter in Java, with JDBC?
I do know how to read OUT for Procedure. I want to know how to read the OUT of RECORD TABLE type?
|
 |
Jan Cumps
Bartender
Joined: Dec 20, 2006
Posts: 2343
|
|
Prashant,
my excuses, but I still don't understand it.
Where do you want to read the OUT parameter?
In a pl/sql program?In a java program?Somewhere else?
Can you post the piece of code where you are trying to read the OUT parameter?
|
 |
Prashant Saraf
Ranch Hand
Joined: Sep 25, 2006
Posts: 50
|
|
Jan Cumps wrote:Prashant,
my excuses, but I still don't understand it.
Where do you want to read the OUT parameter?
In a pl/sql program?In a java program?Somewhere else?
Can you post the piece of code where you are trying to read the OUT parameter?
Sorry Jan, I am using JDBC to read the OUT Parameter.
Java Code is
I want to know what Type to use in registerOutParameter method.
Thanks
Prashant
|
 |
Jan Cumps
Bartender
Joined: Dec 20, 2006
Posts: 2343
|
|
|
The procedure has 2 parameters and is called getChildRelationsByInstanceId , and the JDBC code shows three parameters (question marks) and is called proc3.
|
 |
Jan Cumps
Bartender
Joined: Dec 20, 2006
Posts: 2343
|
|
Here is the way to retrieve user defined types:
http://www.oracle.com/technology/sample_code/tech/java/codesnippet/jdbc/objects/ObjectTypes.html
If you can write your stored procedure so that it returns a cursor to that table, you can programs your JBDC like this:
http://www.enterprisedt.com/publications/oracle/result_set.html
|
 |
Prashant Saraf
Ranch Hand
Joined: Sep 25, 2006
Posts: 50
|
|
hi
here is my code
On cstmt.execute(); it throws following exception.
my procedure returns TABLE of RECORD.
Please help
|
 |
 |
|
|
subject: OUT as Table in StoreProcedure
|
|
|