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 resultset scrollability 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 "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: 3733

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.)
I agree. Here's the link:
subject: resultset scrollability
It's not a secret anymore!