on 10-22-2007 6:02 PM
Hi,
I am trying to use scroll insensitive resultset in following manner-
Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);
ResultSet rs = stmt.executeQuery("some sql here");
rs.last();
but the rs.last() throws this exception-
com.sap.dbtech.jdbc.exceptions.SQLExceptionSapDB: The operation is not allowed for result set type FORWARD_ONLY.
at com.sap.dbtech.jdbc.ResultSetSapDB.assertNotForwardOnly(ResultSetSapDB.java:2725)
at com.sap.dbtech.jdbc.ResultSetSapDB.last(ResultSetSapDB.java:557)
Database version: Kernel 7.5.0 Build 019-121-082-363
Driver Version: MaxDB JDBC Driver, MySQL MaxDB, 7.6.0 Build 030-000-005-567
This used to work with 7.5 version driver. Why this is failing with 7.6 driver, any clues?
Thanks,
Vinod
Hi Vinod,
due to performance improvement when using forward only cursor we changed the default for the resultset type from TYPE_SCROLL_SENSITIVE to TYPE_FORWARD_ONLY starting with JDBC driver version 7.6. So I guess the exception comes from a statement where you didn't set the resultset type while creating it. Please check if all of the statements that you want to be scrollable have set the correct resultset type.
Regards,
Marco
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.