• Post Reply Bookmark Topic Watch Topic
  • New Topic

JDBC Question

 
Sumukh Deshpande
Ranch Hand
Posts: 87
Firefox Browser IntelliJ IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Marshal
Posts: 53176
124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 36031
432
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try catch blocks? Try to map it out here and we can help where you get stuck.
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!