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 |
|
X002548
Not Just a Number
15586 Posts |
|
|
Vinnie881
Master Smack Fu Yak Hacker
1231 Posts |
Posted - 2008-04-22 : 22:38:30
|
| depends on the scenerio. I prefer to use Try Catch when I want to ensure my remaining code does not continue to run when there is a error. |
 |
|
|
Lamprey
Master Smack Fu Yak Hacker
4614 Posts |
Posted - 2008-04-23 : 11:45:22
|
| Yes, it is better. |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
Lamprey
Master Smack Fu Yak Hacker
4614 Posts |
Posted - 2008-04-23 : 12:31:02
|
| From BOL: Errors with severity of 20 or higher that terminate the SQL Server Database Engine task processing for the session. If an error occurs with severity of 20 or higher and the database connection is not disrupted, TRY…CATCH will handle the error.So if you get a severity 20 or higher and the connection is disrupted I don't think it's going to matter how you are handling the error. |
 |
|
|
|
|
|