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

On-Select Trigger

Description

Fires when Oracle Forms would normally execute the open cursor, parse, and execute phases of a query, to identify the records in the database that match the current query criteria.

Definition Level form or block

Legal Commands

SELECT statements, PL/SQL, unrestricted Built-ins

Enter Query Mode no

Usage Notes

Use an On-Select trigger to open and execute the database cursor. Specifically, use this trigger when you are retrieving data from a non-ORACLE data source. The On-Select trigger can be used in conjunction with the On-Fetch trigger to replace the processing that normally occurs in the EXECUTE_QUERY Built-in subprogram.

To perform the default Oracle Forms processing from this trigger, include a call to the SELECT_RECORDS Built-in.

On Failure

no effect

Fires In

EXECUTE_QUERY

Open The Query

On-Select Trigger Example

In the following example, the On-Select trigger is used to call a user exit, 'Query,' and a Built-in subprogram, SELECT_RECORDS, to perform a query against a database.

IF Get_Application_Property(DATASOURCE) = 'DB2' THEN
User_Exit ( 'Query' );
IF Form_Failure OR Form_Fatal THEN
ABORT_QUERY;
END IF;
ELSE
/*
** Perform the default Oracle Forms task of opening the query.
*/
Select_Records;
END IF;


SELECT_RECORDS Built-in