Subject Re: [firebird-support] howto run a program after insert a record
Author Ann W. Harrison
Rick Debay wrote:
>> I need to fire events to print a label after every insert. Do you
> think it's correct to create a trigger to intercept "after insert" and
> using an UDF to call external program?
>
> No. You hinted at a solution yourself when you mentioned events. Have
> a trigger signal a Firebird event. Have a software client register for
> these events. Whenever it receives an event, select all records that
> haven't been printed and print them. Be sure to mark them as printed
> and commit after every label successfully prints.
>

There's one significant difference between calling a UDF from a
trigger and setting an event. The trigger fires on every insert.
The event fires on commit. If you want to know about inserts
whether they succeed or fail, then you want the trigger/UDF
solution. If you want to know only about committed inserts,
then use the event.


Regards,


Ann