Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> please help: problem in calling javastored procedure in Oracle8i

please help: problem in calling javastored procedure in Oracle8i

From: <jy1999_at_my-dejanews.com>
Date: Sat, 20 Mar 1999 06:31:00 GMT
Message-ID: <7cvfb4$n35$1@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:
...............
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 - 00:31:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US