January 9, 2009 at 1:09 am
I have a .NET application which accesses the database only by stored procedures.
I have set an UPDATE trigger on TABLE A.
Now, this trigger can be 'triggered' by a few stored procedures; is there anyway of determining which one caused the trigger to fire?
January 9, 2009 at 1:28 am
- an update trigger is fired by an update event at object level (table/view) !
(so not only from your sprocs, but also by all other update statements !)
- one should keep the scope of a trigger very small, because a trigger is executed in context of the statement that triggered it ! So if the trigger fails, the statement fails, ...
- you want some particular action taken when fired from one or the other specific application/proc, ... maybe you would be better off with a kind of SQLServer Service Broker solution. (i.e. sqlserver messaging system with payload)
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
January 9, 2009 at 1:37 am
Thanks for that, i'm fairly new to SQL, but just to let you know that all updates can only be performed via stored procedures.
Thanks again
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply