Subject | Re: Firebird-2.0.0.12748-0-Win32.exe Problem |
---|---|
Author | Toddly |
Post date | 2006-12-11T21:29:32Z |
--- In firebird-support@yahoogroups.com, "Ivan Prenosil"
<Ivan.Prenosil@...> wrote:
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
<Ivan.Prenosil@...> wrote:
>disable a
> >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
> > trigger. This is on a table that doesn't have any computedfields.
> >1.5
> > Is this a known issue? This all works when using versions 1 or
>Not sure if I follow what is wrong. I have referred to old/new in
> It seems you are trying to update context variable (old/new)
> in after-trigger.
>
> Ivan
>
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