Clear_block built-in clears all records from the current data Block and if the user had made some changes in records which been committed, then Oracle Forms processes the records depending on the argument passed to the Clear_block proc Edure. Syntax
Clear_block (commit_mode number);
Commit_mode is optional action parameter takes the following possible constants as arguments:
Ask_commit
Oracle Forms prompts the user to commit the changes before clearing the block.
Do_commit
Oracle Forms Validates the changes, performs a commit, and clears the current block without prompting the user.
No_commit
Oracle Forms validates the changes and clears the current block without performing a commit or prompting the USER.
no_validate
Oracle Forms Clears the current block without validating the changes, committing the changes, or prompting the user.
Example assume that a push button was on a canvas with lable ' Execute query ' and whenever user clicks on that Execute Query button, it clears the block first without prompting to user then re-executes the query.
BEGINclear_block (no_validate);Execute_query; END;
Using Clear_block to Prevent Save confirmation Dialogs in Oracle Forms