Results 1 to 1 of 1
  1. #1
    Join Date
    May 2003
    Posts
    1

    Unanswered: SQL SERVER Triggers

    I have created a "Status Change Email" trigger on
    a "tblProjects" in SQL Server Enterprise Manager that
    would automatically fire a trigger when someone changes
    the "Status" field's value in the "tblProjects" . The changesto the status are made in a "Projects" form which has theunderlying table as "tblProjects" . I have an "ModifiedBy " field in the same tblProjects that would fetch the value from theCurrent User Name (To know who actually made the change).
    I have made the default value for "ModifiedBy" field in
    the "tblProjects" on SQL Server as "(user_name())".

    When I go back and make changes to the Status field in
    the "Projects" form record, and move to the next record
    the email is triggerd. I get a email message with
    the "ModifiedBy" value for the record I edited as "dbo" instead of the user name who actually changed the value.

    The code doesn't pick up the current user name. Can you
    please help me with troubleshooting the following error.

    Thanks
    Amudha Uday
    Last edited by amudha; 05-13-03 at 15:39.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •