This column cannot be updated because it is derived from an SQL function or expression. Attempted update of read-only column.
This error message might show up when you try to update a computed column. Since such column is computed, you cannot write values directly into it. If you really need a specific value, you need to change the computed source.
This error message also shows up when you try to change values of NEW and OLD variables in triggers when it doesn't make sense. The problem is evident in Firebird 2.0 and higher, while the previous versions silently ignored such logical errors.
Examples include updating OLD.something variable in INSERT triggers, or NEW.something in DELETE triggers. You might have multi-action trigger, in which case you need to check the context variables: DELETING and INSERTING to find out which operation caused the trigger to fire.
CREATE TRIGGER ...
ACTIVE BEFORE INSERT OR UPDATE OR DELETE ...
AS
BEGIN
if (inserting) then new.something = 10;
if (deleting and old.something = 10) then ...
etc.
END





The Firebird FAQ