Re: Help in writing a trigger
- From: Erland Sommarskog <esquel@xxxxxxxxxxxxx>
- Date: Sun, 24 May 2009 08:01:10 -0700
SqlBeginner (SqlBeginner@xxxxxxxxxxxxxxxxxxxxxxxxx) writes:
BEGIN CATCH
Print ('Do error handling or logging here.')
END CATCH
But you better implement that error handling, or else the error will be
swallowed. Since this is in a trigger, the transaction will be doomed,
and you will get an error anyway. However, it would be a generic error,
leaving you clueless of what the real problem is.
--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx
Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
.
- Follow-Ups:
- Re: Help in writing a trigger
- From: SqlBeginner
- Re: Help in writing a trigger
- References:
- Help in writing a trigger
- From: SqlBeginner
- Re: Help in writing a trigger
- From: John Bell
- Re: Help in writing a trigger
- From: SqlBeginner
- Re: Help in writing a trigger
- From: Erland Sommarskog
- Re: Help in writing a trigger
- From: SqlBeginner
- Re: Help in writing a trigger
- From: Erland Sommarskog
- Re: Help in writing a trigger
- From: SqlBeginner
- Re: Help in writing a trigger
- From: John Bell
- Re: Help in writing a trigger
- From: SqlBeginner
- Help in writing a trigger
- Prev by Date: Re: Help in writing a trigger
- Next by Date: Re: Can I Pass a Table Name as a Parameter?
- Previous by thread: Re: Help in writing a trigger
- Next by thread: Re: Help in writing a trigger
- Index(es):
Relevant Pages
|