all groups > sql server msde > february 2007 >
You're in the

sql server msde

group:

error handling



error handling ibrahim
2/15/2007 7:41:36 AM
sql server msde: hi,
i want to catch the error messages and take the control
in delphi, i can do it like this

try
--- statements
except
on e:excepdion do statements
end

can i do it within sql server
Re: error handling Alan Brewer [MSFT]
2/15/2007 3:48:29 PM
If you mean within Transact-SQL, you can in SQL Server 2005 Express Edition
but SQL Server 2000 and MSDE 2000 did not support that type of error
handling.

SQL Server 2005 introduced the TRY-CATCH mechanism for handling errors, see:

Navigation page that links to the pages describing error handling in
Transact-SQL
http://msdn2.microsoft.com/en-us/library/ms179465.aspx

Using TRY-CATCH in Transact-SQL:
http://msdn2.microsoft.com/en-us/library/ms179296.aspx

--
Alan Brewer [MSFT]
SQL Server Documentation Team

Download the latest Books Online update:
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx

This posting is provided "AS IS" with no warranties, and confers no rights.

AddThis Social Bookmark Button