I have a java/DB2 application. Within the application I have couple insert and update statements. I would like to put all updates and inserts within a single transaction. If any part is unsuccessful, the entire transaction should be rolled back. Can you please give me an example of how to put couple INSERT statement within single transaction and then COMMIT or ROLLBACK depending on the success of the operation.
Thanks in advance!