Adsense Ad

Wednesday, 10 May 2017

Oracle Forms: Clear Form

CLEAR_FORM Built-in

Description

Causes Forms Developer to remove all records from, or flush, the current form, and puts the input focus in the first item of the first block.

Syntax

PROCEDURE CLEAR_FORM;

PROCEDURE CLEAR_FORM

(commit_mode NUMBER);

PROCEDURE CLEAR_FORM (commit_mode NUMBER, rollback_mode NUMBER);

Built-in Type restricted procedure

Enter Query Mode no

Parameters

If the end user has made changes to records in the current form or any called form, and those records have not been posted or committed, Forms Developer processes the records, following the directions indicated by the argument supplied for the following parameter:

commit_mode



ASK_COMMIT Forms Developer prompts the end user to commit the changes during CLEAR_FORM processing.

DO_COMMIT Forms Developer validates the changes, performs a commit, and flushes the current form without prompting the end user.

NO_COMMIT Forms Developer validates the changes and flushes the current form without performing a commit or prompting the end user.


NO_VALIDATE Forms Developer flushes the current form without validating the changes, committing the changes, or prompting the end user.


rollback_mode



TO_SAVEPOINT Forms Developer rolls back all uncommitted changes (including posted changes) to the current form's savepoint.

FULL_ROLLBACK Forms Developer rolls back all uncommitted changes (including posted changes) which 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, Forms Developer prevents any commit processing in the called form.)


CLEAR_FORM Restrictions

If you use a PL/SQL ROLLBACK statement in an anonymous block or a user-defined subprogram, Forms Developer interprets that statement as a CLEAR_FORM built-in subprogram with no parameters.

CLEAR_FORM Example

/*

**   Built-in: CLEAR_FORM

**   Example: Clear any changes made in the current form,

**   without prompting to commit.

*/

BEGIN

Clear_Form(No_Validate);


END;

No comments: