|
[Exercise | API Docs | Short Course| Exercises] Help is available for each task.
Task 1To enable transaction handling, in doUpdate(), add code to turn off autocommit.
con.setAutoCommit( false );
Task 2In doUpdate(), if the number of rows affected is zero,
Task 3In doUpdate(), in the last two catch blocks, add code to set the rows processed total iProcessedCount to zero and set the error flag bError to true.
iProcessedCount = 0;
bError = true;
Task 4In doUpdate(), in the finally block, check the error flag bError. If it is true, issue a rollback and print a message. If false, commit the statements.
Copyright 1996-2000 jGuru.com. All Rights Reserved. | ||||||||||
|
| ||||||||||||