Re: help:how to commit before leaving record
Date: Mon, 27 Sep 1999 08:04:59 GMT
Message-ID: <7sn8f7$tg5$1_at_nnrp1.deja.com>
Thanks a lot Robert!
To help other developers possibly interested in this thing, here's how it was done:
In the Pre-Form trigger:
:GLOBAL.PressedCommit := 'N';
In the Post-Record trigger:
if :SYSTEM.RECORD_STATUS = 'CHANGED' then
if :GLOBAL.PressedCommit = 'N' then
Bell;
message('You must commit before leaving this record');
raise FORM_TRIGGER_FAILURE;
end if;
end if;
In the Key-Commit trigger:
begin
:GLOBAL.PressedCommit := 'Y';
Enter;
IF NOT Form_Success THEN
message('Enter failed');
:GLOBAL.PressedCommit := 'N';
RAISE Form_Trigger_Failure;
END IF;
IF :System.Form_Status = 'CHANGED' THEN
Commit_Form;
IF :System.Form_Status <> 'QUERY' THEN
Message('An error prevented your changes from being committed.'); Bell; :GLOBAL.PressedCommit := 'N'; RAISE Form_Trigger_Failure;
END IF;
END IF;
:GLOBAL.PressedCommit := 'N';
end;
Thanks once more, Robert,
I was impressed by your knowledge of Finnish first names.
OPT
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Mon Sep 27 1999 - 10:04:59 CEST