Execute_Query

By
Font size: Decrease font Enlarge font

Execute_Query clears the current block, opens a query, and fetches a number of selected records ( items that are with base_table TRUE). If there are changes to commit, Form Builder prompts the operator to commit them before continuing EXECUTE_QUERY processing. This alert prompt can be avoided by using NO_VALIDATE parameter with EXECUTE_QUERY

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, locking    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 Form Builder fetches all of the selected records.

keyword_two EXECUTE_QUERY(FOR_UPDATE) performs the same actions as EXECUTE_QUERY except that Form Builder 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 Form Builder 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, Form Builder displays a dialog to

notify the operator if a record cannot be reserved for update immediately.

Without the NO_WAIT parameter, Form Builder 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 Corporation 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;

Subscribe to comments feed Comments (0 posted)

total: | displaying:

Post your comment

  • Bold
  • Italic
  • Underline
  • Quote

Please enter the code you see in the image:

Captcha
  • Email to a friend Email to a friend
  • Print version Print version
  • Plain text Plain text

Tagged as:

No tags for this article

Rate this article

0