posted 22 years ago
Hi All,
I have a stored procedude that has a REF CURSOR as its out parameter.
Here is the code that I am trying:
--------------------------------------
conn = dbUtil.getConnection();
stmt = conn.prepareCall(
"{call P_ZEL_REPORTING.PAGE_SENT(?,?)}");
stmt.registerOutParameter(1, OracleTypes.CURSOR);
stmt.setString(2, monthYear);
stmt.execute();
ResultSet rs = (ResultSet)stmt.getObject(1);
-------------------------------------------------
I get the following exception at runtime: SQLException: Unknown type: -10
I have checked everywhere, and it says that I shoud use OracleType.CURSOR and then use the ResultSet object.
I am sure that the problem is not with the code. I am importing all the necessary packages. Is there something I need to have in my environment (some entry in the class path, or something like that) to get this to work. I do have classes12.zip in the classpath.
The wierd thing is I am running many other methods from the same class and calling other stored procedures, and they all work. The only thing different about this one is that it has a REF CURSOR as its about parameter.
I would really appreciate any help. Running out of options here.
Thanks, Jay