Subject Re: [ib-support] Trigger for "AFTER INSERT" and "AFTER UPDATE"
Author Helen Borrie
At 12:14 PM 20-12-00 +0100, you wrote:
>Greetings everybody. My first message on the list:
>
>I need to make an action everytime a table T changes (both, on insert a new
>record and on modify an old record).
>So, it seems logical to create a "trigger for T after insert" and a "trigger
>for T after update", both with the same body (repeating identical block of
>statements). But this isn't structured/modular programming...
>Is there a way to simplify this? (something as "trigger for T after (insert
>AND update)" sintax)
>Or must I create an independent procedure -with the statements- and to
>execute it from both triggers?
>
>Some help will be greatly appreciated. Thanks in advance.
>Hugo.


Unfortunately, you need to copy and paste and create separate triggers with
different names.

In the current syntax, modularized code and copy/paste are equivalent. :))

Helen



All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________