Solved

Transaction Control in DB2

Posted on 2003-11-06
3
976 Views
Last Modified: 2008-03-04
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!
0
Comment
Question by:ane4ka
3 Comments
 
LVL 6

Accepted Solution

by:
PWinter earned 250 total points
ID: 9696642
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: I have seen many questions on EE and elsewhere, asking about how to find either gaps in lists of numbers (id field, usually) ranges of values or dates overlapping date ranges combined date ranges I thought it would be a good …
This article describes some very basic things about SQL Server filegroups.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

947 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now