Re: Try Catch to Pinpoint Set-Based Error?
- From: Erland Sommarskog <esquel@xxxxxxxxxxxxx>
- Date: Tue, 08 Jun 2010 23:43:59 +0200
SnapDive (SnapDive@xxxxxxxxxxxxxxxx) writes:
Since SQL Server failed the action, it has to know what and where
things failed.
Yeah, but that does not mean that it will tell us!
I was thinking that something akin to an OUTPUT clause
would tell me what blew up.
Alas, SQL Server is a bit pedantic, so all rows inserted sofar
in a failing INSERT statement will be rolled back. The one exception
is with INSERT EXEC. But that is only if the called procedure produces
several result sets.
--
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: Try Catch to Pinpoint Set-Based Error?
- From: SnapDive
- Re: Try Catch to Pinpoint Set-Based Error?
- References:
- Try Catch to Pinpoint Set-Based Error?
- From: SnapDive
- Re: Try Catch to Pinpoint Set-Based Error?
- From: Erland Sommarskog
- Re: Try Catch to Pinpoint Set-Based Error?
- From: SnapDive
- Try Catch to Pinpoint Set-Based Error?
- Prev by Date: Re: Query question - Separating Columns?
- Next by Date: Re: Does asynchronous operation supported by oledb provider for openquery?
- Previous by thread: Re: Try Catch to Pinpoint Set-Based Error?
- Next by thread: Re: Try Catch to Pinpoint Set-Based Error?
- Index(es):
Relevant Pages
|