Oracle Stored Procedure returns ResultSet
Date: Fri, 31 Jul 1998 18:41:11 GMT
Message-ID: <6pt348$5hg$1_at_nnrp1.dejanews.com>
I need to write an Oracle stored procedure that executes a query and returns a java.sql.ResultSet object. Could anyone give me an example of such a stored procedure.
The java code that I am going to use to get the java.sql.ResultSet object is the following:
Note: callstmt is a CallableStatement which should be defined according to the signature/parameter definition of the stored procedure.
// EXECUTE CALLABLE STATEMENT SQL
boolean ret = false;
ResultSet results = null;
int updateCount = 0;
try {
ret = callstmt.execute();
if (ret == true){
results = callstmt.getResultSet();
}
else{
updateCount = callstmt.getUpdateCount();
}
return ret;
} catch(Exception e){
System.out.println(e);
}
Thanks
Pax
-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum Received on Fri Jul 31 1998 - 20:41:11 CEST