wood burning stoves 2.0*
The moose likes JDBC and the fly likes JDBC Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "JDBC Question" Watch "JDBC Question" New topic

JDBC Question

Sumukh Deshpande
Ranch Hand

Joined: Feb 17, 2008
Posts: 87

I have a scenario described as follows:

I have 2 UPDATE statements and 2 INSERT statements.
Lets name UPDATE statements as U1 and U2.
Lets name INSERT statements as I1 and I2.

Now what I want to do is:
If U1 fails I1 should not execute but I2 should execute.
If U2 fails both I1 and I2 can execute.

How to achieve this?
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 40052
You are more likely to get a helpful answer if your thread title tells us what the question is about.
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 31077

Try catch blocks? Try to map it out here and we can help where you get stuck.

[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
I agree. Here's the link: http://aspose.com/file-tools
subject: JDBC Question