Subject Re: [firebird-support] Re: Firebird-2.0.0.12748-0-Win32.exe Problem
Author Ann W. Harrison
Toddly wrote:

>>
>
> Not sure if I follow what is wrong. I have referred to old/new in
> many after triggers.
>

There's no problem with referencing old and new contexts in after
action triggers. There is a problem with assigning values to them.
In earlier versions of Firebird, those assignments were quietly
dropped. In V2, attempting to assign to an old or new context
in an after action trigger raises an error.

This works in an after update trigger

if (old.f1 <> new.f1) then
insert into log_record (what) values ('f1 changed');


This doesn't

if (old.f1 > new.f1) then
old.f1 = new.f1;
else
new.f1 = old.f1;


Cheers,


Ann