-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Exception in commit tran
PostPosted: Wed Mar 11, 2015 7:00 am 
Newbie

Joined: Wed Mar 11, 2015 6:23 am
Posts: 2
Hi, I met a problem, please help.

for Loop
begin tran
select record
insert record
commit tran
if exception, rollback tran
end

In 1st occurrence, I insert a record with invalid FK value, then throw exception when commit tran.
In 2nd occurrence, either I select record or insert correct record, it throw exception, the exception is regarding the 1st occurrence.

As each occurrence in the for loop have no dependency, therefore, I want to commit for those correct record, and just rollback for those invalid record. However, seems I cannot do that, please help.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.