Here are the differences between RowSet and ResultSet:
ResultSet | RowSet |
---|---|
ResultSet always maintains a connection to the database. | RowSet can be connected and disconnected from the database.|
Cannot be serialized. | RowSet objects can be serialized. |
The ResultSet object cannot be passed over the network. | You can pass RowSet objects over the network. |
ResultSet object is not a JavaBean object You can use the executeQuery() method to create/get a result set. |
The ResultSet object is a JavaBean object. You can use the RowSetProvider.newFactory().createJdb cRowSet() method to get a RowSet. |
By default, ResultSet objects are not scrollable or updateable. | By default, RowSet objects are scrollable and updateable. |
The above is the detailed content of Explain the difference between RowSet and ResultSet in JDBC?. For more information, please follow other related articles on the PHP Chinese website!