Commit/Rollback.....
I'm trying to add logic to an existing process...
Here it is... Bear with me...
The process is looping and for each loop, it performs a commit or a rollback.
The new logic needs to insert some new data
Web Development
I'm trying to add logic to an existing process...
Here it is... Bear with me...
The process is looping and for each loop, it performs a commit or a rollback.
The new logic needs to insert some new data
by john.payne
Assuming the commit or rollback is performed based on the success or failure of the existing DML statments inside the loop, add your new logic to the block where the commit would have been performed and move your commit/rollback logic inside this same block, after testing for success/failure of your insert statements.
i.e.
if success then
commit
else
rollback
endif
would become...
if success then
insert statment
if success then
commit else
rollback
endif
endif
Hope this helps.
by jhill
by ruvic
Some database like oracle has a special feature called "Savepoint" wherein you can selectively commit/rollback specific part of your code.
Please check with your database.
by jhill
by jhill
This discussion is closed to new replies.
Sort by Trending