A script-enabled browser is required for this page to function properly.

EXIT_FORM Built-in

Description

Provides a means to exit a form, confirming commits and specifying rollback action.

Syntax

PROCEDURE EXIT_FORM;

PROCEDURE EXIT_FORM
(commit_mode NUMBER);

PROCEDURE EXIT_FORM
(commit_mode NUMBER,
rollback_mode
NUMBER);

Built-in Type restricted procedure

Enter Query Mode yes

Parameters

commit_mode 
 
ASK_COMMIT
 
Oracle Forms prompts the operator to commit the changes during EXIT_FORM processing.

However, if RECORD_STATUS is INSERT but the record is not valid, Oracle Forms instead asks the operator if the form should be closed. If the operator says yes, the changes are rolled back before the form is closed.

DO_COMMIT
 
Oracle Forms validates the changes, performs a commit, and exits the current form without prompting the operator if they want to commit the changes.

NO_COMMIT
 
Oracle Forms validates the changes and exits the current form without performing a commit or prompting the operator.

NO_VALIDATE
 
Oracle Forms exits the current form without validating the changes, committing the changes, or prompting the operator.
 
rollback_mode 
 
TO_SAVEPOINT
 
Oracle Forms rolls back all uncommitted changes (including posted changes) to the current form's savepoint.
 
FULL_ROLLBACK
 
Oracle Forms rolls back all uncommitted changes (including posted changes) that were made during the current Runform session. You cannot specify a FULL_ROLLBACK from a form that is running in post-only mode. (Post-only mode can occur when your form issues a call to another form while unposted records exist in the calling form. To prevent losing the locks issued by the calling form, Oracle Forms prevents any commit processing in the called form.)
 
NO_ROLLBACK
 
Oracle Forms exits the current form without rolling back to a savepoint. You can leave the top level form without performing a rollback, which means that you retain the locks across a NEW_FORM operation. These locks can also occur when running Oracle Forms from an external 3GL program. The locks remain in effect when Oracle Forms returns control to the program.

Usage Notes

Because the default parameters of EXIT_FORM are ASK_COMMIT for commit_mode and TO_SAVEPOINT for rollback_mode, invoking EXIT_FORM without specifying any parameters in some contexts may produce undesired results. For example, if the form is in POST only mode and EXIT_FORM is invoked without parameters, the user will be prompted to commit the changes. However, regardless of the user’s input at that prompt, the default rollback_mode of TO_SAVEPOINT rolls back the changes to the form despite a message confirming that changes have been made. To avoid conflicts, explicitly specify parameters.

EXIT_FORM Examples

/*

** Built-in: EXIT_FORM and POST
** Example: Leave the called form, without rolling back the
** posted changes so they may be posted and
** committed by the calling form as part of the
** same transaction.
*/
BEGIN
Post;

/*
** Form_Status should be 'QUERY' if all records were
** successfully posted.
*/
IF :System.Form_Status <> 'QUERY' THEN
Message('An error prevented the system from posting changes');
RAISE Form_Trigger_Failure;
END IF;
/*
** By default, Exit_Form asks to commit and performs a
** rollback to savepoint. We've already posted, so we do
** not need to commit, and we don't want the posted changes
** to be rolled back.
*/
Exit_Form(NO_COMMIT, NO_ROLLBACK);
END;