java.sql.SQLException: Ref cursor is invalid error !
843859Jul 13 2005 — edited Mar 15 2007Hi,
I'm getting the following error while retrieving the cursor object. Just wondering what could be the possible reason. The stored proc is returning the cursor properly. The code I'm using is as follows:
cStt.registerOutParameter(1, OracleTypes.CURSOR) ; cSttt.registerOutParameter(1, OracleTypes.CURSOR) ;
cStt.execute();
rSet = (ResultSet) cStt.getObject(1);
rSet = (ResultSet) cStt.getObject(2);
The first cursor is working fine, but i'm getting error for the next cursor ie. 2.
java.sql.SQLException: Ref cursor is invalid
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
at oracle.jdbc.driver.OracleStatement.getCursorValue(OracleStatement.jav
a:3681)
at oracle.jdbc.driver.OracleStatement.getObjectValue(OracleStatement.jav
a:5792)
at oracle.jdbc.driver.OracleStatement.getObjectValue(OracleStatement.jav
a:5622)
at oracle.jdbc.driver.OracleCallableStatement.getObject(OracleCallableSt
atement.java:698)
at com.cisco.pfa.bsc.portal.dao.BSCActualPortalDAO.getMultipleAnswerData
(BSCActualPortalDAO.java:640)
Any pointer on this will be highly appreciated.
Thnx,
Shamik