Re: try catch ok, what about finally?
- From: "JCollum" <jcollum@xxxxxxxxx>
- Date: 13 Nov 2006 10:11:49 -0800
And it doesn't. I can get it to work in the sample that you provided
but not in my trigger. The trigger that I'm working with is one large
if/else statement inside of a try/catch. I do have some exec statements
(i.e. exec sp_executesql @query, N'@exists int OUTPUT', @exists =
@pathExists OUTPUT) inside of the try block, I wonder if that's causing
the issue?
When I trigger the trigger I'm getting the message: 'The current
transaction cannot be committed and cannot support operations that
write to the log file. Roll back the transaction.' I'm trying to do an
update inside of the catch block so that I can write the error message
to the table that I'm trying to update (it has a field for the result
of an operation). So I guess I'm gonna back pedal to the version that I
had before.
JCollum wrote:
Mike:
You're right, that worked. Thanks. I'll try this in my full blown sql
and see if it works.
.
- Follow-Ups:
- Re: try catch ok, what about finally?
- From: Mike C#
- Re: try catch ok, what about finally?
- From: Mike C#
- Re: try catch ok, what about finally?
- References:
- try catch ok, what about finally?
- From: JCollum
- Re: try catch ok, what about finally?
- From: Mike C#
- Re: try catch ok, what about finally?
- From: JCollum
- Re: try catch ok, what about finally?
- From: Mike C#
- Re: try catch ok, what about finally?
- From: JCollum
- try catch ok, what about finally?
- Prev by Date: Re: try catch ok, what about finally?
- Next by Date: Re: Managing Databases on Multiple Servers
- Previous by thread: Re: try catch ok, what about finally?
- Next by thread: Re: try catch ok, what about finally?
- Index(es):
Relevant Pages
|