Subject | Re: [firebird-support] Re: Firebird-2.0.0.12748-0-Win32.exe Problem |
---|---|
Author | Ann W. Harrison |
Post date | 2006-12-11T21:58:18Z |
Toddly wrote:
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
>>There's no problem with referencing old and new contexts in after
>
> Not sure if I follow what is wrong. I have referred to old/new in
> many after triggers.
>
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