ResultSet Holdability : ResultSet Holdability « Database « Java Tutorial






You may improve database performance by including the ResultSet holdability:

  1. java.sql.ResultSet.HOLD_CURSORS_OVER_COMMIT
  2. java.sql.ResultSet.CLOSE_CURSORS_AT_COMMIT

Set ResultSet Holdability Using the Connection Object

int holdability = java.sql.ResultSet.HOLD_CURSORS_OVER_COMMIT;
conn.setHoldability(holdability);

Or

int holdability = java.sql.ResultSet.CLOSE_CURSORS_AT_COMMIT;
conn.setHoldability(holdability);








20.9.ResultSet Holdability
20.9.1.ResultSet Holdability
20.9.2.Check ResultSet Holdability