I have an AFTER INSERT trigger on table A than calls a stored procedure
which performs a DISABLE TRIGGER ALL on table A, does some actions then
finally does an ENABLE TRIGGER ALL.
This works fine normally except, when I'm stepping through the SP code, the
entire IDE hangs when executing the DISABLE TRIGGER. Presumably this is
because the debugging process is preventing the trigger from disabling
because it is still technically executing. I guess that is understandable!
Is this expected behaviour? Likely to ever change?
Thanks in advance.
regards,
Paul Ritchie.
New Zealand.Why would you need to disable a trigger during its execution? Do you also pu
t
the database in single-user mode at the same time?
ML|||So I can insert another record in the same table.
Thanks for the sarcasm - much appreciated. If you don't know the answer
then why bother?
Paul.
"ML" <ML@.discussions.microsoft.com> wrote in message
news:FD1BB005-A3DD-42F7-A42D-9435424D9DE3@.microsoft.com...
> Why would you need to disable a trigger during its execution? Do you also
> put
> the database in single-user mode at the same time?
>
> ML|||If recursion is the problem turn that off. I'm not being sarcastic. A
disabled trigger will allow other users to insert data into the table while
by-passing your procedure.
ML
No comments:
Post a Comment