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.

Records_to_Fetch property<br />

Description<br />

Returns the number of records <strong>Form</strong> <strong>Builder</strong> expects an On-Fetch trigger to fetch and create as queried<br />

records.<br />

You can programmatically examine the value of Records_To_Fetch when you are using transactional<br />

triggers to replace default <strong>Form</strong> <strong>Builder</strong> transaction processing when running against a non-ORACLE<br />

data source.<br />

Applies to block<br />

Set not settable<br />

Refer to Built-in<br />

GET_BLOCK_PROPERTY<br />

Usage Notes<br />

Records_To_Fetch is defined only within the scope of an On-Fetch trigger.<br />

The first time the On-Fetch trigger fires, the value of Records_To_Fetch is either the array size (as<br />

specified by the Query Array Size block property) or the number of records displayed + 1, whichever is<br />

larger.<br />

If the On-Fetch trigger creates this many queried records, the next time the On-Fetch trigger fires, the<br />

value of Records_To_Fetch will be the same number.<br />

If, however, the On-Fetch trigger creates fewer records than the value of Records_To_Fetch and returns<br />

without raising <strong>Form</strong>_trigger_Failure, <strong>Form</strong> <strong>Builder</strong> will fire the On-Fetch trigger again.<br />

Records_To_Fetch will be the set to its previous value minus the number of queried records created by<br />

the previous firing of the On-Fetch trigger.<br />

This behavior continues until one of the following events occurs:<br />

• The trigger does not create a single queried record (signaling a successful end of fetch).<br />

• The expected number of queried records gets created.<br />

• The trigger raises a <strong>Form</strong>_trigger_Failure (signaling that the fetch aborted with an error and fetch<br />

processing should halt).<br />

Records_to_Fetch examples<br />

Example<br />

/*<br />

** Call a client-side package function to retrieve<br />

** the proper number of rows from a package cursor.<br />

*/<br />

DECLARE<br />

j NUMBER := Get_Block_Property(blk_name, RECORDS_TO_FETCH);<br />

emprow emp%ROWTYPE;<br />

BEGIN<br />

220

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

Saved successfully!

Ooh no, something went wrong!