SQLException Not Thrown When You Change Result Set Holdability (Doc ID 2091078.1)

Last updated on DECEMBER 21, 2015

Applies to:

JDBC - Version 10.2.0.1 to 11.2.0.4.0 [Release 10.2 to 11.2]
Information in this document applies to any platform.

Symptoms

According to Database JDBC Developer's Guide, you get SQLException if you change the result set holdability:

Result Set Holdability

Result set holdability was introduced since JDBC 3.0. This feature enables applications to decide whether the ResultSet objects should be open or closed, when a commit operation is performed. The commit operation could be either implicit or explicit.

Oracle Database supports only HOLD_CURSORS_OVER_COMMIT. Therefore, it is the default value for Oracle JDBC drivers. Any attempt to change holdability will throw a SQLException exception.

 However, the driver does not throw SQLException.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms