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

EXECUTE_QUERY Built-in

Description

Flushes the current block, opens a query, and fetches a number of selected records. If there are changes to commit, Oracle Forms prompts the operator to commit them before continuing EXECUTE_QUERY processing.

Syntax

PROCEDURE EXECUTE_QUERY;

PROCEDURE EXECUTE_QUERY
(keyword_one VARCHAR2);

PROCEDURE EXECUTE_QUERY
(keyword_two VARCHAR2);

PROCEDURE EXECUTE_QUERY
(keyword_one VARCHAR2,
keyword_two
VARCHAR2);

PROCEDURE EXECUTE_QUERY
(keyword_one VARCHAR2,
keyword_two
VARCHAR2,
lockin
g VARCHAR2);

Built-in Type restricted procedure

Enter Query Mode yes

Parameters

no parameters 
 
EXECUTE_QUERY flushes the current block, opens a query, and fetches a number of selected records.
 
keyword_one 
 
EXECUTE_QUERY(ALL_RECORDS) performs the same actions as EXECUTE_QUERY except that Oracle Forms fetches all of the selected records.
 
keyword_two 
 
EXECUTE_QUERY(FOR_UPDATE) performs the same actions as EXECUTE_QUERY except that Oracle Forms attempts to lock all of the selected records immediately.
 
keyword_one/ keyword_two 
 
EXECUTE_QUERY(ALL_RECORDS, FOR_UPDATE) performs the same actions as EXECUTE_QUERY except that 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.

EXECUTE_QUERY Restrictions

Oracle recommends that you use the ALL_RECORDS and FOR_UPDATE parameters with caution. Fetching a large number of rows could cause a long delay. Locking a large number of rows at once requires many resources.

EXECUTE_QUERY Examples

/*

** Built-in: EXECUTE_QUERY
** Example: Visit several blocks and query their contents,
** then go back to the block where original block.
*/
DECLARE
block_before VARCHAR2(80) := :System.Cursor_Block;
BEGIN
Go_Block('Exceptions_List');
Execute_Query;
Go_Block('User_Profile');
Execute_Query;
Go_Block('Tasks_Competed');
Execute_Query;
Go_Block( block_before );
END;