Subject Re: Firebird-2.0.0.12748-0-Win32.exe Problem
Author Toddly
--- In firebird-support@yahoogroups.com, "Ivan Prenosil"
<Ivan.Prenosil@...> wrote:
>
> >I am getting an error message that says something like ...
> >
> > Attempt to update a read only column failed ...
> >
> > I get this error in a few places but one is when trying to
disable a
> > trigger. This is on a table that doesn't have any computed
fields.
> >
> > Is this a known issue? This all works when using versions 1 or
1.5
>
> It seems you are trying to update context variable (old/new)
> in after-trigger.
>
> Ivan
>

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

Here is the trigger ...

CREATE TRIGGER UPDATEPROPID_IMPROVEMENTHEADER FOR IMPROVEMENTHEADER
ACTIVE
AFTER UPDATE POSITION 5
AS
BEGIN
IF (New.PropID <> Old.PropID) THEN
BEGIN
Update Narratives
Set PropID = New.PropID
WHERE PropID = Old.PropID and
ImprID = New.ImprID;
END

IF(USER not in ('COMPASS', 'SYSDBA')) THEN
EXECUTE PROCEDURE UpdateProperty_Global NEW.EntryTime,
NEW.PropID;

IF(NEW.ValuationMethod = 9) THEN
Update RapBuilding
Set TempValue1 = 0,
TempValue2 = 0,
TempValue3 = 0
Where Imprid = NEW.Imprid;
IF (NEW.AsmtCode1 <> OLD.AsmtCode1) THEN
BEGIN
/* Checks First Assessment Code */
EXECUTE PROCEDURE CheckAsmtCode NEW.AsmtCode1,
NEW.PropID, NEW.ImprType_Code, NULL, 1 RETURNING_VALUES NEW.AsmtCode1;
EXECUTE PROCEDURE Validate_RAPBuilding NULL, NEW.IMPRID;
END

END