setHoldability(int holdability)

Syntax:

void setHoldability(int holdability)
                    throws SQLException

Description:

Changes the default holdability of ResultSet objects created using this Connection object to the given holdability. The default holdability of ResultSet objects can be be determined by invoking DatabaseMetaData.getResultSetHoldability().

The only supported holdability mode in is ResultSet.CLOSE_CURSORS_AT_COMMIT. Any other setting will generate an SQLException.

Parameters:

holdability

a ResultSet holdability constant; ResultSet.CLOSE_CURSORS_AT_COMMIT

Throws:

SQLException - if a database access error occurs

SQLFeatureNotSupportedException - if the given holdability is not supported

Reference:

For more information, reference JDBC documentation for: Connection.setHoldability(int)