Transactions & SQL Stored Procedures

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

If a .NET transaction gets rolled back and SQL SP that, itslef contains SQL
transactions had already been invoked, will the SQL transaction get rolled
back if the .NET transaction gets rolled back?

Thanks,

Scott
 
Hi Scott,

The sp would have to know that the .net transaction rolled back, so you
would have to pass a parameter to it, but the timing probably makes this
impossible, as the sp has already been invoked before the rollback.

Bernie Yaeger
 
In older days we used @@trancount in stored proc to check if it was called
within transaction - if so - new transaction was not created so 'global'
rollback could rollback actions executed by sp

Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top