Subject Re: [firebird-support] Silent exception / rollback
Author Ivan Prenosil
> Is it possible not to permit database action ( like deleting,
> updating) based on SP result w/o exception message ? For example ,
> I would like to stop deleting a record if stored procedure
> called by trigger "before delete" returns me "False" , and I don't
> want to see any messages !!! .
>
> Don't be focused on deleting , because based on this I would like to
> implement that based on one field value I can stop someone to change
> another field.

CREATE TRIGGER ... BEFORE UPDATE AS
BEGIN
IF ( <action not allowed> ) THEN NEW.AnotherField = OLD.AnotherField;
END


Ivan