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

DELETE_RECORD Built-in

Description

When used outside an On-Delete trigger, removes the current record from the block and marks the record as a delete. Records removed with this Built-in are not removed one at a time, but are added to a list of records that are deleted during the next available commit process.

If the record corresponds to a row in the database, Oracle Forms locks the record before removing it and marking it as a delete.

If a query is open in the block, Oracle Forms fetches a record to refill the block if necessary. See also the description for the CLEAR_RECORD Built-in subprogram.

In an On-Delete trigger, DELETE_RECORD initiates the default Oracle Forms processing for deleting a record during the Post and Commit Transaction process, as shown in Example 2 below.

Syntax

PROCEDURE DELETE_RECORD;

Built-in Type restricted procedure

Enter Query Mode no

Parameters

none

DELETE_RECORD Examples

Example 1

/*

** Built-in: DELETE_RECORD
** Example: Mark the current record in the current block for
** deletion.
*/
BEGIN
Delete_Record;
END;

Example 2

/*

** Built-in: DELETE_RECORD
** Example: Perform Oracle Forms delete record processing
** during commit-time. Decide whether to use this
** Built-in or a user exit based on a global flag
** setup at startup by the form, perhaps based on
** a parameter.
** Trigger: On-Delete
*/
BEGIN
/*
** Check the global flag we set during form startup
*/
IF :Global.Using_Transactional_Triggers = 'TRUE' THEN
User_Exit('my_delrec block=EMP');
/*
** Otherwise, do the right thing.
*/
ELSE
Delete_Record;
END IF;
END;


CLEAR_RECORD Built-in