Do you mean the resultset that was created in the question or EVERY/ANY ResultSets ?ResultSet is a read only object. You cannot change (i.e. update) anything in the database using a ResultSet object.
I dont know if it is a good practice, but it's possible use a ResultSet to change values in a DB:
To insert:
Code: Select all
ResultSet rs = connection.createStatement( ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE).executeQuery(sql);
rs.moveToInsertRow();
rs.updateObject(column,value);
rs.insertRow();
Code: Select all
rs.absolute(lineOfTable);
rs.updateObject(column,value);
rs.updateRow();
Code: Select all
rs.absolute(lineOfTable);
rs.deleteRow();