Trying to run a script to set a trigger from a button, below is the contents of the scriptfile
Code: Select all
CREATE TRIGGER "delete_tblJob" BEFORE DELETE ON "tblJob"
REFERENCING OLD AS oldrow
FOR EACH ROW WHEN (oldrow."jobid" < 300000)
BEGIN ATOMIC
SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'Invoices can not be deleted, only cancelled';
END;
Is there anything in the code missing?
Prefer running a simple script instead of embedding the sql statement in a macro.
Thanks for your thoughts