-- A default ResultSet object is not updatable and has a cursor that moves forward only. Thus, you can iterate through it only once and only from the first row to the last row. It is possible to produce ResultSet objects that are scrollable and/or updatable. An updatable result set allows modification to data in a table through the result set. The following code makes a result set that is scrollable and insensitive to updates by others: try { // Create a statement that will return updatable result sets Statement stmt = connection.createStatement( ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE); //Primary key EmployeeID must be specified //so that the result set is updatable ResultSet resultSet = stmt.executeQuery( "SELECT EmployeeID, Name, Office FROM employees"); } catch (SQLException e) { } The updatable result se...
About Java and it's related concepts..