|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Saturday, November 27, 2010 11:14 PM
Points: 356,
Visits: 99
|
|
I mean can we execute triggers by directly invoking them as we call the stored procedure or the UDFs. Is there any way to do so through front end (using VB or C#). If any body has an answer for this question pls do reply
Regards
Avaneesh Bajoria.
|
|
|
|
|
SSC-Addicted
      
Group: General Forum Members
Last Login: Monday, February 04, 2013 7:02 AM
Points: 459,
Visits: 94
|
|
I dont think it is a relavent question. As if u direct execute them how do u get data into inserted..... tables. So, it can not be allowed to do like that.
|
|
|
|
|
SSC-Addicted
      
Group: General Forum Members
Last Login: Monday, September 10, 2012 10:30 AM
Points: 480,
Visits: 461
|
|
| The short version of the answer is, "No, this is not allowed."
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Tuesday, August 10, 2010 5:07 AM
Points: 2,732,
Visits: 23,078
|
|
TRIGGERS are based on an INSERT, UPDATE, or DELETE happening. So, you can cause a trigger to fire by simply doing one of those actions - it does not mean you have to change anything:
UPDATE MyTable SET Field1 = Field1
The update trigger would fire and I have not really changed any data.
If you find yourself having to do this regularly, it is a big red flag that you are likely to have a design issue. Triggers are there to act on data changes, so if you need them to act when there is not a data change, you are likely to have misused them. If this is simply because triggers were disabled for some time and you need them to fire now, I can see that being a reasonable reason for having to do something like this.
|
|
|
|