In the preceding examples, you learned how to query a database by explicitly establishing a
Connection to the database, preparing a
Statement for querying the database and executing the query. In this section, we demonstrate the
RowSet interface, which configures the database connection and prepares query statements automatically. The interface
RowSet provides several set methods that allow you to specify the properties needed to establish a connection (such as the database URL, user name and password of the database) and create a
Statement (such as a query).
RowSet also provides several get methods that return these properties.
There are two types of
RowSet objects—connected and disconnected. ...