November 5, 2007 at 12:10 pm
hello sql gurus
I am calling a stored procedure from within a stored procedure wrapped in a Begin and end transaction. My question is:
if the called procedure fails does the main stored procedure gets rolled back?
Appreciate anyone taking a look at this?
November 5, 2007 at 12:41 pm
only if a rollback is issued all transactions are undone if the transaction count <> 0.
you can use the @@trancount to check if a transaction still exists.
- check raiserror in bol for info on errorlevel (only >16 gets rollbacked automaticaly)
Only if you capture the returncodes or errors and code the rollback, your can be sure things work out the way you want to.
check try...catch with sql2005
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data/code to get the best help[/url]
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Need a bit of Powershell? How about this
Who am I ? Sometimes this is me but most of the time this is me
November 5, 2007 at 1:28 pm
thanks
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply