Subject | Re: [firebird-support] howto run a program after insert a record |
---|---|
Author | Ann W. Harrison |
Post date | 2008-05-07T22:27:41Z |
Rick Debay wrote:
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
>> I need to fire events to print a label after every insert. Do youThere's one significant difference between calling a UDF from a
> 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.
>
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