Results 1 to 5 of 5

Thread: How to enable/disable Triiger in SQL2005 Using C# code

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Dec 2008
    Posts
    65

    How to enable/disable Triiger in SQL2005 Using C# code

    Hi guys

    Any idea on how can I enable/disable Triiger in SQL2005 Using C# code?

    Thanks any help will be well appreciated.

  2. #2
    A SQL Server fool GaryMazzone's Avatar
    Join Date
    Aug 2005
    Location
    Dover,NH
    Posts
    7,493

    Re: How to enable/disable Triiger in SQL2005 Using C# code

    You use SQL command then pass to the DB using a connection and command oject. Use ExecuteNonQuery


    DISABLE TRIGGER Schema.TriggerName ON Schema.TableName;
    Sometimes the Programmer
    Sometimes the DBA

    Mazz1

  3. #3
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: How to enable/disable Triiger in SQL2005 Using C# code

    You could also look at DatabaseDdlTrigger
    http://technet.microsoft.com/en-us/l...r(SQL.90).aspx

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: How to enable/disable Triiger in SQL2005 Using C# code

    You could also look at DatabaseDdlTrigger
    http://technet.microsoft.com/en-us/l...r(SQL.90).aspx

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Dec 2008
    Posts
    65

    Re: How to enable/disable Triiger in SQL2005 Using C# code

    yup thanks i already figured it out...but anyways thanks for the reply

Posting Permissions

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



Click Here to Expand Forum to Full Width