views:

116

answers:

1

Hi, I have a stored procedure in an Oracle 10g database, in my java code, i call it with:

CallableStatement cs = bdr.prepareCall("Begin ADMBAS01.pck_basilea_reportes.cargar_reporte(?,?,?,?,?); END;", ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
    cs.setInt(1, this.reportNumber);
    cs.registerOutParameter(2, OracleTypes.CURSOR);
    cs.registerOutParameter(3, OracleTypes.INTEGER);
    cs.registerOutParameter(4, OracleTypes.VARCHAR);
    cs.setDate(5, new java.sql.Date(this.fecha1.getTime()));
    cs.execute();

ResultSet rs = (ResultSet)cs.getObject(2);

i do obtain an ResultSet with correct records in it, but when i try an "scroll_insensitive - only" operation, (like absolute(1) ). I keep getting an SQLException stating that it doesn't work on FORWARD only resultSet.

So how can i obtain this ResultSet with scroll_insensitive capabilites?

Thanks in Advance.

A: 

The result set type is merely a suggestion to the driver, which the driver can ignore or downgrade to FORWARD_ONLY if it can't comply. See here for details.

Jim Garrison
Thanks for the link, i've checked the restrictions on result set types and that doesn't seem to be the only problem. I've changed my query for a simpler one just to try and i keep getting the same type of resultSet.
rafa colunga