Try Catch in SQL Server 2000?
Asked Answered
B

5

5

Is it possible using Try-Catch in SQL Server 2000?

Boykins answered 24/12, 2010 at 6:12 Comment(1)
No. Only in 2005 and 2008, 2008 R2.Winsome
A
9

No, it is not possible.

This was only from Sql Server 2005

Check TRY...CATCH (Transact-SQL) and check the Other Versions

Ammerman answered 24/12, 2010 at 6:16 Comment(0)
H
6

No. Try Catch block was introduced in SQL SERVER 2005.

Following article shows how you can use @@ERROR to check for errors.

Understanding error handling in SQL Server 2000

Hapten answered 24/12, 2010 at 6:17 Comment(0)
I
4

Instead you can user @@Error..

check this article about error handling

Inlier answered 24/12, 2010 at 6:20 Comment(0)
H
1

@@ERROR is a variable updated by the SQL Server database engine after each statement is executed on the server. We can see by Print @@Error

Hippodrome answered 24/12, 2010 at 10:46 Comment(0)
P
0

No Try Catch Was introduced 2005 and later version ,,,you have to use @@Error for handling your exception

Poppied answered 22/10, 2014 at 7:12 Comment(1)
Don't you think it is a little bit late? Like 4 years?Diffuser

© 2022 - 2024 — McMap. All rights reserved.