Click here to monitor SSC
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase

Delete trigger with parameters from webform Expand / Collapse
Posted Friday, March 8, 2013 6:56 AM


Group: General Forum Members
Last Login: Tuesday, May 3, 2016 6:49 AM
Points: 13, Visits: 99
I have a web form with a gridview of a sql table that will allow the user to delete a row. This is a supervisory task that is necessary since updating the table would be a logistical nightmare. I would like to use a delete trigger within SQL Server 2008 R2 that will move the information into a delete history table before it deletes the row. The question that I have is I want to pass 3 parameters to the history table at the same time. Also, in the delete triggers how do I identify fields that need to be inserted into the history table and how do I identify the parameters. One parameter comes from a drop down list on the form. The other two are current date and time which can be calculated either in the trigger or on the form. I also need to pass the username which is cached using Windows Authentication on the form.

I have the form completed and the trigger started, but I am getting stuck on the insert syntax especially relating to the parameters.
Post #1428563
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse