This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes resultset scrollability Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "resultset scrollability" Watch "resultset scrollability" New topic

resultset scrollability

asit dhal

Joined: May 05, 2009
Posts: 13

I have the following resultset

Here, my reslutset is scroll insensitive. hence any changes to the database (through other session which is committed) shouldn't be visible to the application after the resultset query is executes. But in my case the changes are made visible.

Can somebody tell me why ??
Martin Vajsar

Joined: Aug 22, 2010
Posts: 3719

Which database and JDBC driver are you using? Read the documentation of the driver, a few details might be in there.

Also, the Javadoc (JDK6) for the ResultSet.TYPE_SCROLL_INSENSITIVE constant says:
The constant indicating the type for a ResultSet object that is scrollable but generally not sensitive to changes to the data that underlies the ResultSet.

(Emphasis added.)
It is sorta covered in the JavaRanch Style Guide.
subject: resultset scrollability
It's not a secret anymore!