Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
    Bookmark Topic Watch Topic
  • New Topic

RowSet over ResultSet - Need explanation

 
Debs Chatterjee
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Report post to moderator
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
Sheriff
Posts: 48917
58
  • Mark post as helpful
  • send pies
  • Report post to moderator
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.
 
    Bookmark Topic Watch Topic
  • New Topic