Title: RE: getting resultset from stored procedure - oracle
Here's a more detailed elaboration:
 
javax.sql.DataSource ds = getDataSource(...);
java.sql.Connection conn = ds.getConnection();
 
CallableStatement stmt = conn.prepareCall("{?=call get_catalogue(?)}");
                
stmt.registerOutParameter(1, OracleTypes.CURSOR);
 
stmt.setLong(2, myInParameter);
stmt.execute();
 
ResultSet res = (ResultSet)stmt.getObject(1);
-----Original Message-----
From: A mailing list for Enterprise JavaBeans development [mailto:[EMAIL PROTECTED]]On Behalf Of Vaibhav Bhomkar
Sent: 17 October 2001 15:10
To: [EMAIL PROTECTED]
Subject: Re: getting resultset from stored procedure - oracle


Create Oracle Stored Procedure having Out Parameter as REF CURSOR
Register this OUT parameter to OracleTypes.CURSOR
using cursor.next() u can loop through.

I hope this will help u.

cheers
Vaibhav


    -----Original Message-----
    From:   Abu dhahir [SMTP:[EMAIL PROTECTED]]
    Sent:   Wednesday, October 17, 2001 9:59 AM
    To:     [EMAIL PROTECTED]
    Subject:        getting resultset from stored procedure - oracle

    Hi gurus

    is there a way that i can receive a resultset or array from stored
    procedure of oracle.
    i want to receive a cursor generated or the rows collection generated in
    that procedure

    cheers
    abu
    Iron rusts from disue; stagnant water loses its purity and in cold weather
    becomes frozen; even so does inaction sap the vigor of the mind.
    Leonardo da Vinci (1452 - 1519), The Notebooks

    ===========================================================================
    To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
    of the message "signoff EJB-INTEREST".  For general help, send email to
    [EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to