This is a procedure which has one out parameter of SYS_REFCURSOR type.
In java for working out with this procedure you need to import ojdbc14.jar and need to set registerOutParameter type as OracleTypes.CURSOR
PROCEDURE p_get_data(query_result OUT SYS_REFCURSOR);
In java for working out with this procedure you need to import ojdbc14.jar and need to set registerOutParameter type as OracleTypes.CURSOR
import oracle.jdbc.driver.OracleTypes;
CallableStatement callStmt = connection.prepareCall("{call p_get_data(?)}");
callStmt.registerOutParameter(1, OracleTypes.CURSOR);
callStmt.execute();
ResultSet resultSet = (ResultSet) callStmt.getObject(1);
if(resultSet.next()) { //Your Code here }
0 comments:
Post a Comment