pass parameters to a Trigger?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: DraguVaso (pietercoucke_at_hotmail.com)
Date: 03/24/04


Date: Wed, 24 Mar 2004 14:31:43 +0100

Hi,

I have an application with an SQL-database in which I want to put Triggers.

I want to create a Trigger like this:

I do an INSERT to a Table, and the Trigger has to perform an INSERT with
paramters OTHER than the parameters passed by the intial INSERT-statement.
Like for exemple creating somewhere a log with the username of the user
which is working with the application.

Is this possibly? And if yes: how?

Thanks a lot,

Pieter



Relevant Pages

  • pass parameters to a Trigger?
    ... I have an application with an SQL-database in which I want to put Triggers. ... I want to create a Trigger like this: ... Like for exemple creating somewhere a log with the username of the user ... Pieter ...
    (microsoft.public.dotnet.languages.vb)
  • Re: panic: ffs_blkfree: freeing free block
    ... Pieter de Goeje wrote: ... they can no longer trigger it. ... Doing a binary search now. ...
    (freebsd-current)
  • Re: SQL Trigger
    ... tell who is who from using the username() funcions etc. ... accessID but cannot obvously pass that into the trigger as a paramater. ... If their accessid is not held against the row they are trying to edit ...
    (microsoft.public.sqlserver.programming)
  • Re: suser_sname trigger (audit records)
    ... >insert into tblBank ... This trigger will fail. ... with values for the userstamp and username columns only. ... I don't see anything wrong with this trigger. ...
    (microsoft.public.sqlserver.programming)
  • Setting of @@FETCH_STATUS
    ... I have a snippet of code from a trigger: ... WHERE Name = @UserName) ... MSDN page on @@FETCH_STATUS seems to imply that my select won't set it. ...
    (microsoft.public.sqlserver.programming)