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

ENTER_QUERY Built-in

Description

The behavior of ENTER_QUERY varies depending on any parameters you supply.

Syntax

PROCEDURE ENTER_QUERY;

PROCEDURE ENTER_QUERY
(keyword_one VARCHAR2);

PROCEDURE ENTER_QUERY
(keyword_two VARCHAR2);

PROCEDURE ENTER_QUERY
(keyword_one VARCHAR2,
keyword_two
VARCHAR2);

PROCEDURE ENTER_QUERY
(keyword_one VARCHAR2,
keyword_two
VARCHAR2,
locking
VARCHAR2);

Built-in Type restricted procedure

Enter Query Mode yes (to redisplay the example record from the last query executed in the block)

Parameters

no parameters 
 
ENTER_QUERY flushes the current block and puts the form in Enter Query mode. If there are changes to commit, Oracle Forms prompts the operator to commit them during the ENTER_QUERY process.
 
keyword_one 
 
ENTER_QUERY(ALL_RECORDS) performs the same actions as ENTER_QUERY except that when EXECUTE_QUERY is invoked, Oracle Forms fetches all of the selected records.
 
keyword_two 
 
ENTER_QUERY(FOR_UPDATE) performs the same actions as ENTER_QUERY except that when EXECUTE_QUERY is invoked, Oracle Forms attempts to lock all of the selected records immediately.
 
keyword_one/ keyword_two 
 
ENTER_QUERY(ALL_RECORDS, FOR_UPDATE) performs the same actions as ENTER_QUERY except that when EXECUTE_QUERY is invoked, Oracle Forms attempts to lock all of the selected records immediately and fetches all of the selected records.
 
locking 
 
Can be set to NO_WAIT anytime that you use the FOR_UPDATE parameter. When you use NO_WAIT, Oracle Forms displays a dialog to notify the operator if a record cannot be reserved for update immediately.

Without the NO_WAIT parameter, Oracle Forms keeps trying to obtain a lock without letting the operator cancel the process.

Use the NO_WAIT parameter only when running against a data source that supports this functionality.

ENTER_QUERY Restrictions

ENTER_QUERY Examples

/*

** Built-in: ENTER_QUERY
** Example: Go Into Enter-Query mode, and exit the form if
** the user cancels out of enter-query mode.
*/
BEGIN
Enter_Query;
/*
** Check to see if the record status of the first record
** is 'NEW' immediately after returning from enter-query
** mode. It should be 'QUERY' if at least one row was
** returned.
*/

IF :System.Record_Status = 'NEW' THEN
Exit_Form(No_Validate);
END IF;
END;