11.01.2013 Views

Oracle Forms Developer – Form Builder Reference, Volume 1

Oracle Forms Developer – Form Builder Reference, Volume 1

Oracle Forms Developer – Form Builder Reference, Volume 1

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

On-Select trigger<br />

Description<br />

Fires when <strong>Form</strong> <strong>Builder</strong> would normally execute the open cursor, parse, and execute phases of a query,<br />

to identify the records in the database that match the current query criteria.<br />

Definition Level form or block<br />

Legal Commands<br />

SELECT statements, PL/SQL, unrestricted built-ins<br />

Enter Query Mode no<br />

Usage Notes<br />

Use an On-Select trigger to open and execute the database cursor. Specifically, use this trigger when<br />

you are retrieving data from a non-ORACLE data source. The On-Select trigger can be used in<br />

conjunction with the On-Fetch trigger to replace the processing that normally occurs in the<br />

EXECUTE_QUERY built-in subprogram.<br />

To perform the default <strong>Form</strong> <strong>Builder</strong> processing from this trigger, include a call to the<br />

SELECT_RECORDS built-in.<br />

On Failure<br />

no effect<br />

Fires In<br />

EXECUTE_QUERY<br />

Open The Query<br />

See Process Flowcharts<br />

On-Select trigger examples<br />

Example<br />

In the following example, the On-Select trigger is used to call a user exit, ’Query,’ and a built-in<br />

subprogram, SELECT_RECORDS, to perform a query against a database.<br />

IF Get_Application_Property(DATASOURCE) = ’DB2’ THEN<br />

User_Exit ( ’Query’ );<br />

IF <strong>Form</strong>_Failure OR <strong>Form</strong>_Fatal THEN<br />

ABORT_QUERY;<br />

END IF;<br />

ELSE<br />

/*<br />

** Perform the default <strong>Form</strong> <strong>Builder</strong> task of opening the<br />

query.<br />

457

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!