Suppose you have the following ... An ASP.NET web application that calls a stored procedure to delete an entry. There is a trigger in the table that will insert an audit record every time the record is deleted. I want to be able to write in the audit record the name of the user who deleted the record. What would be the best way to achieve this? I know that I can remove the trigger and delete the stored removal procedure, insert the audit record before the removal, but is there any other alternative?
If the username was passed as a parameter to the stored delete procedure, do you still need to get this value in the trigger that was excluded when the record was deleted? I just drop it there ...
source
share