File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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: 2497
    
    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: 2497
        
        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
     
    jQuery in Action, 2nd edition
     
    subject: OUT as Table in StoreProcedure