Subject | Re: [firebird-support] error attempted update of read-only column creating a trigger |
---|---|
Author | Dmitry Yemanov |
Post date | 2007-05-25T08:23:42Z |
Didier Gasser-Morlay wrote:
context (OLD in any trigger or NEW in after-trigger).
referenced objects.
Dmitry
>This means that you're attempting to assign to an improper trigger
> I am puzzled by the following error message. I am porting a database
> from 1.5 to 2.0.1 and when creating the following trigger:
>
> SET TERM ^ ;
> CREATE TRIGGER EMPLOYEE_BI0 FOR EMPLOYEE ACTIVE
> BEFORE INSERT POSITION 0
> AS
> begin
> if (new.username is not null) then
> if (exists (select * from vlogin where vlogin.username =
> new.username)) then
> exception USERNAME_EXISTS;
> end^
> SET TERM ; ^
>
> Engine Code : 335544359
> Engine Message :
> attempted update of read-only column
context (OLD in any trigger or NEW in after-trigger).
> Note: vlogin is a view on two tables:I'd check their triggers as well, as the error could be caused by the
> employees and contacts
referenced objects.
Dmitry