Write trigger for multiple tables
-
Hi I need to write trigger for more than one table i.e single trigger for multiple tables,user can not update,delete,insert on tables.If user try to modify on sql server table need to show alert. I tried with after trigger for single table , it works fine .please suggest me better way. regards, Vishnu.
-
Hi I need to write trigger for more than one table i.e single trigger for multiple tables,user can not update,delete,insert on tables.If user try to modify on sql server table need to show alert. I tried with after trigger for single table , it works fine .please suggest me better way. regards, Vishnu.
As far as I know you can't but this thread has come up with a possible solution that you could use assuming the code in the trigger is the same for all tables Single Trigger on multiple tables[^] Basically the solution they are suggesting is to have the triggers call a common stored proc
Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch
-
Hi I need to write trigger for more than one table i.e single trigger for multiple tables,user can not update,delete,insert on tables.If user try to modify on sql server table need to show alert. I tried with after trigger for single table , it works fine .please suggest me better way. regards, Vishnu.
vishnukamath wrote:
user can not update,delete,insert on tables.If user try to modify on sql server table need to show alert.
Database permissions were designed specifically for what you are looking for. If you are implementing access controls using triggers, I would say that is not a good idea. :)
Chris Meech I am Canadian. [heard in a local bar] In theory there is no difference between theory and practice. In practice there is. [Yogi Berra] posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]