Getting stored procedure resultset from JDBC
449819Aug 10 2005 — edited Aug 11 2005I'm trying to call a stored procedure from Java.
I setup my CallableStatement and execute.
CallableStatement cs = dbConnection.prepareCall("{call GET_USER(?,?)}");
cs.registerOutParameter(2,OracleTypes.CURSOR);
cs.setString(1, user.getUsername());
cs.execute();
dbResultSet = ((OracleCallableStatement)cs).getCursor(1);
It just hangs on execute forever. I have tested against other Stored Procedures that are not supposed to return a ResultSet and those work fine from same Database.
The stored procedure signature looks like this.
PROCEDURE GET_USER(userLogon varchar2,curData OUT sys_refcursor)
I have tested the stored procedure in SQL*Plus and it is working correctly. How can I get these results back into my Java application correctly?