Results 1 to 3 of 3

Thread: 1 trigger multiple tables

  1. #1

    Thread Starter
    Frenzied Member Lightning's Avatar
    Join Date
    Oct 2002
    Location
    Eygelshoven
    Posts
    1,611

    1 trigger multiple tables

    Hi all,

    I have a simple question. In my database I need to create triggers for serveral tables, all those triggers are exactle the same. So I wonder, is it possible to have 1 trigger which is triggerd by by different tables, or do I have to write that trigger multiple times.
    VB6 & C# (WCF LINQ) mostly


    If you need help with a WPF/WCF question post in the NEW WPF & WCF forum and we will try help the best we can

    My site

    My blog, couding troubles and solutions

    Free online tools

  2. #2
    Fanatic Member Blade's Avatar
    Join Date
    Jan 1999
    Location
    Stoke-on-Trent, UK
    Posts
    527

    Re: 1 trigger multiple tables

    Triggers are based on the insert/update/delete of only the table they are linked to, therefore you'll need to have the code in a trigger on each table.

    However, if the code really is identical, maybe you could put it in a stored proc and just call that from each trigger. You still have to put the call in each table trigger, but at least if you need to change the code you only need to do it in the proc?

  3. #3

    Thread Starter
    Frenzied Member Lightning's Avatar
    Join Date
    Oct 2002
    Location
    Eygelshoven
    Posts
    1,611

    Re: 1 trigger multiple tables

    I was affraid of that, but I think I ask, just in case
    VB6 & C# (WCF LINQ) mostly


    If you need help with a WPF/WCF question post in the NEW WPF & WCF forum and we will try help the best we can

    My site

    My blog, couding troubles and solutions

    Free online tools

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