Is there a way to pass data into a trigger?

  • I have to create an audit table for an appliction that ties the data changes to an event such as a button click.  In a separate table I can store some data about the event when the button is clicked including an event id.  How can I pass that event id to the trigger so the data changes can be matched to the button click event?

    Thanks,

    Dave

     

  • Do you have a unique identifier (eg a Session ID) that can be used to link the event id to the set of data that has been changed as a result of that event ?

    If your security/audit requirements are so tight that you need this level of audit, maybe you should lock down all access to underlying tables, and force all insert/delete/update to be via stored procs ? This way you can pass the session/event id as a required parameter into each stored proc call and not have to worry about triggers, period.

     

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply