Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2001-05

Re: Triggers

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Michael Van Canneyt
to Andrew Higgs: I have a trigger (before insert) on a table which does three things.. 1 - Insert a line…
Andrew Higgs wrote 12 lines
Hi all, I have a trigger (before insert) on a table which does three things.. 1 - Insert a line number from a generator. 2 - Updates a field by adding 1 to it. 3 - Updates a DateTime field. Can anyone explain to me why when I do an insert through isql all 3 steps are taken care of, but when I do an insert from an fpc (1.0.5) app using TIBQuery, TIBTransaction and TIBDatabase only the first step is performed? I have checked this a couple of times.

Do you explicitly put a value into all the fields ? If so, the action of the trigger is cancelled.

Michael.

Andrew Higgs

Hi all,

I have a trigger (before insert) on a table which does three things..

1 - Insert a line number from a generator.
2 - Updates a field by adding 1 to it.
3 - Updates a DateTime field.

Can anyone explain to me why when I do an insert through isql all 3 steps are taken care of, but when I do an insert from an fpc (1.0.5) app using TIBQuery, TIBTransaction and TIBDatabase only the first step is performed? I have checked this a couple of times.

Any assistance would be greatly appreciated?

Kind regards
Andrew Higgs