Difference between TYPE_SCROLL_INSENSITIVE and TYPE_SCROLL_SENSITIVE

What’s the difference between TYPE_SCROLL_INSENSITIVE , and TYPE_SCROLL_SENSITIVE?

Static int TYPE_SCROLL_INSENSITIVE

Constant indicating that the type for a ResultSet object is scrollable but not sensitive to changes made by others.
It does not reflect the changes made though it is open.

Static int TYPE_SCROLL_SENSITIVE

Constant indicating that the type for a ResultSet object is scrollable but sensitive to changes made by others.
It reflects the changes made.
But, changes made by both are visible is closed and reopened.

What’s the difference between TYPE_SCROLL_INSENSITIVE , and TYPE_SCROLL_SENSITIVE?

The following are the differences between TYPE_SCROLL_INSENSITIVE , and TYPE_SCROLL_SENSITIVE:

1. The changes made are not reflected while the result is open in TYPE_SCROLL_INSENSITIVE, where as TYPE_SCROLL_SENSITIVE does.
2. The changes are made visible if both types are closed and then reopened.
3. The TYPE_SCROLL_INSENSITIVE result set makes the result set read only where as TYPE_SCROLL_SENSITIVE does not.
Different types of RowSet
JDBC RowSet Types - Connected: A connected RowSet Object is permanent in nature. It doesn’t terminate until the application is terminated...
JDBC ResultSet
JDBC ResultSet - How can you retrieve data from the ResultSet?, What are the various means of accessing results from ResultSet objects?...
What is a non-repeatable read?
JDBC Non-repeatable Read - A Non-repeatable read is where one transaction cannot read the second time unless another transaction alters the row...
Post your comment