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

LOCK_RECORD Built-in

Description

Attempts to lock the row in the database that corresponds to the current record. LOCK_RECORD locks the record immediately, regardless of whether the Locking Mode block property is set to Immediate (the default) or Delayed.

When executed from within an On-Lock trigger, LOCK_RECORD initiates default database locking. The following example illustrates this technique.

Syntax

PROCEDURE LOCK_RECORD;

Built-in Type unrestricted procedure

Enter Query Mode no

Parameters

none

LOCK_RECORD Examples

/*

** Built-in: LOCK_RECORD
** Example: Perform Oracle Forms standard record locking on the
** queried record which has just been deleted or
** updated. Decide whether to use default
** processing or a user exit by consulting a
** global flag setup at startup by the form,
** perhaps based on a parameter.
** Trigger: On-Lock
*/
BEGIN
/*
** Check the global flag we set up at form startup
*/
IF :Global.Non_Oracle_Datasource = 'TRUE' THEN
User_Exit('my_lockrec block=EMP');
/*
** Otherwise, do the right thing.
*/
ELSE
Lock_Record;
END IF;
END;


On-Lock Trigger