from this java tutorial: http://docs.oracle.com/javase/tutorial/ ... owset.html
and then from this subsequent java tutorial: http://docs.oracle.com/javase/tutorial/ ... owset.htmlA RowSet object is scrollable and updatable by default, so by populating a RowSet object with the contents of a result set, you can effectively make the result set scrollable and updatable.
Passing ResultSet Objects
The simplest way to create a JdbcRowSet object is to produce a ResultSet object and pass it to the JdbcRowSetImpl constructor. Doing this not only creates a JdbcRowSet object but also populates it with the data in the ResultSet object.
Why the result set needs to be scrollable if a RowSet object is scrollable by default? Is not that the main advantadge of wrapping a ResultSet in a JdbcRowSet?Note: The ResultSet object that is passed to the JdbcRowSetImpl constructor must be scrollable.
Again referring directly to the JdbcRowSet interface:
quoted from the same java tutorial: http://docs.oracle.com/javase/tutorial/ ... owset.htmlOne of the main uses of a JdbcRowSet object is to make a ResultSet object scrollable and updatable when it does not otherwise have those capabilities.
They in their tutorials quite rim the point that one of the main use of a JdbcRowSet is to add Scrollabilty and Updatability. However by using JdbcRowSetImpl you have to pass a ResultSet which is updatable and scrollable if you want your JdbRowSet object as such.
Now I have posted this question also in stackoverflow and I recieved a confirm that the tutorial contradicts itself. However from this forum I would like to know for the exam questions... what should I reply to a potential question:
What are the main advantages of the JdbcRowSet object in comparison with a ResultSet object?
Thanks in advance. It blowed my mind!
Thanks in advance.