Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RollBack transaction!

Status
Not open for further replies.

wendywam

Programmer
Jun 21, 2004
15
ZA
Hi
I have sql stored procedure like this
begin tran
sql statements....
if @error <> 0
begin
Rollback Tran
end
else
commit tran
What should happen is that if there is an error then the rollback will happen i.e no tables will be updated.
Now what happens if a rollback gets aborted?
 
The impression I get is very few people use transactions with Jet (which we assume you are using as this an Access forum). Of those that do, I suspect hardly any also use stored procedures.

Personally I don't know the answer to your question but I seem to remember that Jet creates 'temporary' workspace so your transaction never hits the database until you successfully commit.

The situation of a rollback not rolling back is verging on the philosphical.

Personally I'd prefer to see if error = 0 then commit else rollback.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top