View Single Post

   
  #1 (permalink)  
Old 02-25-2008, 02:25 AM
hikemike@gmail.com
 
Posts: n/a
Default [JDBC] StoredProcedure cursor returned is not TYPE_SCROLL_INSENSITIVE

I have seen the problem reported in various news groups going back to
1999 (Deja.News). Does anyone know if it's been fixed yet. There
appears to be no solution on the web.

I call a simple stored procedure from a java program and use the
following line:

protected static final String GET_ACCOUNTS_PROC = "{call
ACCOUNT.GET_ACCOUNTS_PROC_ALL(?,?)}";

cs = connection.prepareCall(GET_ACCOUNTS_PROC,
ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);

cs.execute();
rset = (ResultSet) cs.getObject(2);
rset.first();

throws a SQL Exception:

Invalid operation for forward only resultset : first

Ridiculous that I can't do this. Someone please tell me I'm wrong.

oracle 9 driver: ojdbc14.jar --> jdbcracle:thin driver

Reply With Quote