SQL Stored Procedures

I have an SQL Stored Procedure in Oracle in which I have two out parameters and one in parameter.
In the procedure I have a numberof select statements and one insert statements.
How to execute those statements?
And how to set the in parameter and recieve the out parameter?
[285 byte] By [Monika] at [2007-11-15 20:12:42]
# 1 Re: SQL Stored Procedures
I never try store procedure. You may consider the CallableStatement and the method prepareCall() in
the class Connection. You may consider the following code snippet. This is the code that I modify
some stuff in the book.

CallableStatement csmt = conn.prepareCall("execute inv_report(?, ? ,?)");
csmt.setString(1, "I am in parameter");
csmt.registerOutParameter(2, Types.INTEGER);
csmt.String(3, " I am the in/out parameter");
csmt.registerOutParameter(3, Types.STRING);
ResultSet rs = csmt.executeQuery();
String out_3 = rs.getString(3);
int out_2 = rs.getInt(2);

I am not aware of how to set the store procedure in the Oracle database, Hence, I do not write down
that. This might be the code which is used in the application which may access data via store procedure.
you may try your case. This code snippet is never tried.

good luck,
Alfred Wu
kib63613 at 2007-11-10 2:53:39 >