my dog learned polymorphism
The moose likes Java in General and the fly likes RowSet over ResultSet - Need explanation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Reply locked New topic

RowSet over ResultSet - Need explanation

Debs Chatterjee

Joined: Jun 13, 2012
Posts: 2
Hi All,

I was reading through RowSet Objects in JDBC Tutorial & found that it is written as
Some DBMSs do not support result sets that can be scrolled (scrollable), and some do not support result sets that can be updated (updatable). If a driver for that DBMS does not add the ability to scroll or update result sets, you can use a RowSet object to do it.
So that means if we use RowSet Object, by default it is scrollable & updatable. But there is another statement written in
Using JDBCRowSet Objects
topic that -
A JdbcRowSet object created with a ResultSet object serves as a wrapper for the ResultSet object. Because the RowSet object rs is scrollable and updatable, jdbcRs is also scrollable and updatable. If you have run the method createStatement without any arguments, rs would not be scrollable or updatable, and neither would jdbcRs.

So now I am confused, in the above case RowSet is dependent on resultSet type. Then if some DBMS drive does not support scrollable RowSet object it will also not support jdbcRowSet object which is constructed like above. Can someone explain me this? Also can somebody tell me some example of DBMS which does not support scrollable resultSet ? What is actual usage of RowSet over ResultSet ?
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 46320
This looks like a duplicate of the thread in the JDBC forum, so I shall (Rob, Robert, Martijn, Stephan, I hope you don’t mind) close it.
I agree. Here's the link:
subject: RowSet over ResultSet - Need explanation
It's not a secret anymore!