![]() |
| ||
| Code inside CATCH not execute Hy, you guys! I'm trying to implement in a trigger write by-me error handling with TRY...CATCH, but I'm loosing a lot of time without success. :'( Here there's a simple code write for test: ALTER TRIGGER [dbo].[INS_AlarmsEvents]I think the code between BEGIN CATCH...END CATCH are not execute, because I find table "Errors" empty. Anyone can help me? :) |
| ||
| Re: Code inside CATCH not execute Your code in the TRY don't fire a error into the catch. If you run this one you will se that it prints out ERROR: BEGIN TRY But this dosn't print 'ERROR': BEGIN TRY |
| |||
| Re: Code inside CATCH not execute Quote:
Quote:
Quote:
any idea? thanks for any reply! :) bye |
| ||
| Re: Code inside CATCH not execute This gode writes ERROR: BEGIN TRY If you click into messages insted of resoults you will see the text: (0 row(s) affected) |
| ||
| Re: Code inside CATCH not execute The problem is only with trigger! if I made a query everything work fine. The trigger fire, I'm sure! |
| ||
| Re: Code inside CATCH not execute If you "Include Actual Execution Plan" what does it say when you Insert or Update a record? You could also try to change: ALTER TRIGGER [dbo].[INS_AlarmsEvents] To: ALTER TRIGGER [dbo].[INS_AlarmsEvents] |
| All times are GMT -4. The time now is 8:10 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC