Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Oracle Stored Procedure returns ResultSet
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 - 15:52:43 CDT
![]() |
![]() |