How can I use a trigger in sql 2005 to set a session variable?

Discussion in 'Databases' started by Sleeping Troll, Jul 19, 2008.

  1. #1
    I want an application variable to indicate that a users table has changed, I am aware of sql 2005 triggers and that is about as far as it goes. Any help greatly appreciated.
     
    Sleeping Troll, Jul 19, 2008 IP
  2. Social.Network

    Social.Network Member

    Messages:
    517
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    35
    #2
    Can you provide some details regarding the business requirement? Secondly, I would not recommend using a SQL trigger to set a session variable. Is the application using traditional 3-tier architecture? If so, I would consider another approach to set the session variable.
     
    Social.Network, Jul 23, 2008 IP