This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes OUT as Table in StoreProcedure Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "OUT as Table in StoreProcedure" Watch "OUT as Table in StoreProcedure" New topic
Author

OUT as Table in StoreProcedure

Prashant Saraf
Ranch Hand

Joined: Sep 25, 2006
Posts: 52

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: 2491
    
    8

Do you want to know how to read this OUT parameter in Java, with JDBC?


OCUP UML fundamental and ITIL foundation
youtube channel
Prashant Saraf
Ranch Hand

Joined: Sep 25, 2006
Posts: 52

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?
Prashant Saraf
Ranch Hand

Joined: Sep 25, 2006
Posts: 52

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: 2491
        
        8

    The procedure has 2 parameters and is called getChildRelationsByInstanceId , and the JDBC code shows three parameters (question marks) and is called proc3.
    Prashant Saraf
    Ranch Hand

    Joined: Sep 25, 2006
    Posts: 52

    hi
    here is my code



    On cstmt.execute(); it throws following exception.

    java.sql.SQLException: ORA-03115: unsupported network datatype or representation


    my procedure returns TABLE of RECORD.

    Please help
     
     
    subject: OUT as Table in StoreProcedure
     
    Similar Threads
    Run dynamic sql in stored procedure problem
    Create procedure for inserting record into table : Table name dynamically as an Param
    registerOutParameter for table?
    calling procedure with user defined IN & OUT parameters
    Create procedure for inserting record into table : Table name dynamically as an Param