please help: problem in calling javastored procedure in Oracle8i

From: <jy1999_at_my-dejanews.com>
Date: Sat, 20 Mar 1999 06:31:44 GMT
Message-ID: <7cvfch$n37$1_at_nnrp1.dejanews.com>



I am a new Oracle user, right now using Oracle8i and java as develop tools. I have two questions:

(1)suppose in a java stored procedure, I have a ResultSet object holds a set
of records (ResultSet rs = mystatement.executeQuery("select * from emp"), how can I pass this rs ResultSet object back to the stand alone calling program written in java.

(2)when I call a java stored procedure, in the code below:
[Quoted] ...............
CallableStatement stmt = conn.prepareCall("call stored_procedure(?, ?)");

stmt.setString(1, firstParam);
stmt.registerOutParameter(2, secondParam);
stmt.execute();

secondParam = stmt.getString(2);
...............
/* up to here I suppose can get the secondParam's value set by the stored procedure after calling it, but I got a NULL value. Why? But the firstparam is successfully pass to the stored procedure. */

Can anybody give me help? Ff you can attach some simple samples would be great!

Thanks a lot!

Jiang Yin

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Sat Mar 20 1999 - 07:31:44 CET

Original text of this message