Subject | RE: [firebird-support] Re: Firebird-2.0.0.12748-0-Win32.exe Problem |
---|---|
Author | Rick Debay |
Post date | 2006-12-11T22:15:26Z |
EXECUTE PROCEDURE CheckAsmtCode NEW.AsmtCode1, NEW.PropID,
NEW.ImprType_Code, NULL, 1 RETURNING_VALUES NEW.AsmtCode1
This line of code tries to store a value in NEW.AsmtCode1. The NEW.*
values are read-only in an AFTER trigger.
-----Original Message-----
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Toddly
Sent: Monday, December 11, 2006 4:30 PM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Re: Firebird-2.0.0.12748-0-Win32.exe Problem
--- In firebird-support@yahoogroups.com, "Ivan Prenosil"
<Ivan.Prenosil@...> wrote:
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
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://www.firebirdsql.org and click the Resources item on the
main (top) menu. Try Knowledgebase and FAQ links !
Also search the knowledgebases at http://www.ibphoenix.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo! Groups Links
Disclaimer: This message (including attachments) is confidential and may be privileged. If you have received it by mistake please notify the sender by return e-mail and delete this message from your system. Any unauthorized use or dissemination of this message in whole or in part is strictly prohibited. Please note that e-mails are susceptible to change. RxStrategies, Inc. shall not be liable for the improper or incomplete transmission of the information contained in this communication or for any delay in its receipt or damage to your system. RxStrategies, Inc. does not guarantee that the integrity of this communication has been maintained nor that this communication is free from viruses, interceptions or interference.
NEW.ImprType_Code, NULL, 1 RETURNING_VALUES NEW.AsmtCode1
This line of code tries to store a value in NEW.AsmtCode1. The NEW.*
values are read-only in an AFTER trigger.
-----Original Message-----
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Toddly
Sent: Monday, December 11, 2006 4:30 PM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Re: Firebird-2.0.0.12748-0-Win32.exe Problem
--- In firebird-support@yahoogroups.com, "Ivan Prenosil"
<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 many
> It seems you are trying to update context variable (old/new) in
> after-trigger.
>
> Ivan
>
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
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://www.firebirdsql.org and click the Resources item on the
main (top) menu. Try Knowledgebase and FAQ links !
Also search the knowledgebases at http://www.ibphoenix.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo! Groups Links
Disclaimer: This message (including attachments) is confidential and may be privileged. If you have received it by mistake please notify the sender by return e-mail and delete this message from your system. Any unauthorized use or dissemination of this message in whole or in part is strictly prohibited. Please note that e-mails are susceptible to change. RxStrategies, Inc. shall not be liable for the improper or incomplete transmission of the information contained in this communication or for any delay in its receipt or damage to your system. RxStrategies, Inc. does not guarantee that the integrity of this communication has been maintained nor that this communication is free from viruses, interceptions or interference.