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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

•<br />

On-Fetch trigger<br />

Description<br />

When a query is first opened, fires immediately after the On-Select trigger fires, when the first records<br />

are fetched into the block. While the query remains open, fires again each time a set of rows must be<br />

fetched into the block.<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 />

When you write an On-Fetch trigger to replace default fetch processing, the trigger must do the<br />

following:<br />

Retrieve the appropriate number of records from the non-ORACLE data source, as indicated by the<br />

setting of the Records_To_Fetch property.<br />

Create that number of queried records in the current block.<br />

Populate the records with the retrieved data.<br />

Create queried records from an On-Fetch trigger by calling the CREATE_QUERIED_RECORD<br />

built-in subprogram.<br />

446<br />

While the query remains open, the On-Fetch trigger continues to fire as more records are needed in the<br />

block. This behavior continues:<br />

until no queried records are created in a single execution of the trigger. Failing to create any records<br />

signals an end-of-fetch to <strong>Form</strong> <strong>Builder</strong>, indicating that there are no more records to be retrieved.<br />

until the query is closed, either by the operator or programmatically through a call to<br />

ABORT_QUERY.<br />

until the trigger raises the built-in exception FORM_TRIGGER_FAILURE.<br />

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

FETCH_RECORDS built-in.<br />

Do not use an ABORT_QUERY built-in in an On-Fetch trigger. ABORT_QUERY is not valid in an<br />

On-Fetch trigger, and produces inconsistent results.<br />

On Failure<br />

no effect<br />

Fires In<br />

Fetch Records<br />

See Process Flowcharts

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

Saved successfully!

Ooh no, something went wrong!