Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
aakcse
Aged Yak Warrior
570 Posts |
Posted - 2010-04-16 : 11:18:39
|
| Hi all,one quick question,If have a code as below If any exeption is raised, the cursor will go to catch block and execute it, before that It will roll back all the dml in begin try and end try, or I need to explicitly mention in the catch block to roll back.begin try ...... end try begin catch ... end catchThanksak-Neil |
|
|
Transact Charlie
Master Smack Fu Yak Hacker
3451 Posts |
Posted - 2010-04-16 : 11:20:19
|
| you have to rollback in the catch block. (assuming you want to)Charlie===============================================================Msg 3903, Level 16, State 1, Line 1736The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION |
 |
|
|
Transact Charlie
Master Smack Fu Yak Hacker
3451 Posts |
|
|
aakcse
Aged Yak Warrior
570 Posts |
Posted - 2010-04-16 : 11:30:56
|
| yes exactly I am getting this errorMsg 3903, Level 16, State 1, Line 1736The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION-Neil |
 |
|
|
Transact Charlie
Master Smack Fu Yak Hacker
3451 Posts |
Posted - 2010-04-16 : 11:37:14
|
| post the complete code. You've probably got a nested rollback or something.Charlie===============================================================Msg 3903, Level 16, State 1, Line 1736The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION |
 |
|
|
|
|
|
|
|