RowSets are a JDBC 2.0 extension to the java.sql.ResultSet interface. Guess what, it makes life a lot easier for all JDBC programmers. No more Connection objects, statement objects, just a single RowSet will do everything for you.

Rowsets make it easy to send tabular data over a network. They can also be used to provide scrollable result sets or updatable result sets when the underlying JDBC driver does not support them.

A RowSet object contains a set of rows from a result set or some other source of tabular data, like a file or spreadsheet. Because a RowSet object follows the JavaBeans model for properties and event notification, it is a JavaBeans component that can be combined with other components in an application. As is true with other Beans, application programmers will probably use a development tool to create a RowSet object and set its properties.

Rowsets may have many different implementations to fill different needs. These implementations fall into two broad categories, rowsets that are connected and those that are disconnected.

The following code snippet might make the usage of RowSets a bit clear :


import javax.sql.RowSet;
import oracle.jdbc.rowset.OracleJDBCRowSet;


RowSet rowset = new OracleJDBCRowSet();

while ( )
// These variables have been declared earlier

callType = rowset.getString("CALL_TYPE");
otherNumber= rowset.getString("OTHER_NUMBER");
timestamp = rowset.getTimestamp("CHARGING_TIMESTAMP");
volume = rowset.getInt("VOLUME");

rowset.updateFloat("CHARGE", volume * 0.50);
// Closing the DB connection.

The required jars : ojdbc14.jar,, ocr12.jar comes along with Oracle 9i.


The following links will give you a headstart with RowSets :

Tutorials :

Implementation Downloads

Rowset implementations : Public Review :

Amit Ray.

Those people who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)