InterviewSolution
Saved Bookmarks
| 1. |
How To Insert And Delete A Row Programmatically? (new Feature In Jdbc 2.0) |
|
Answer» Make sure the resultset is updatable. 2. set VALUE for each column. uprs.moveToInsertRow();//to set up for insertuprs.updateString("col1" "strvalue"); uprs.updateInt("col2", 5); ... 3. call inserRow() method to finish the row insert process. uprs.insertRow();To DELETE a row: move to the specific position and call deleteRow() method: uprs.absolute(5);uprs.deleteRow();//delete row 5 To SEE the changes call refreshRow(); uprs.refreshRow();Make sure the resultset is updatable. 2. set value for each column. 3. call inserRow() method to finish the row insert process. To delete a row: move to the specific position and call deleteRow() method: To see the changes call refreshRow(); |
|