File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes Understanding types of Result Sets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Understanding types of Result Sets" Watch "Understanding types of Result Sets" New topic

Understanding types of Result Sets

Shridhar Raghavan
Ranch Hand

Joined: May 27, 2010
Posts: 71

I have been looking around at result sets. JAVA ResultSets

I wanted to understand

1 - SENSITIVE Scrollable resultset and an INSENSITIVE one
2 - Cursor Holdability

HOLD_CURSORS_OVER_COMMIT: ResultSet cursors are not closed; they are holdable: they are held open when the method commit is called. Holdable cursors might be ideal if your application uses mostly read-only ResultSet objects.
CLOSE_CURSORS_AT_COMMIT: ResultSet objects (cursors) are closed when the commit method is called. Closing cursors when this method is called can result in better performance for some applications.

Tim McGuire
Ranch Hand

Joined: Apr 30, 2003
Posts: 820

Scroll sensitive means that your result set is dynamic. If the underlying data changes while the result set is alive and it is scroll sensitive, then your result set is updated with the most recent information. Exactly how this is done is "implementation defined".

Holdable means you give the application control over what happens to the result set when commit is called.
You may want to keep your result set open. You can see how "CLOSE_ON_COMMIT" would use less resources.

I agree. Here's the link:
subject: Understanding types of Result Sets
It's not a secret anymore!