Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Delete trigger with parameters from webform Expand / Collapse
Author
Message
Posted Friday, March 08, 2013 6:56 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, April 14, 2014 12:50 PM
Points: 3, Visits: 76
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