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.

CREATE_QUERIED_RECORD built-in<br />

Description<br />

When called from an On-Fetch trigger, creates a record on the block’s waiting list. The waiting list is an<br />

intermediary record buffer that contains records that have been fetched from the data source but have not<br />

yet been placed on the block’s list of active records. This built-in is included primarily for applications<br />

using transactional triggers to run against a non-ORACLE data source.<br />

Note that there is no way to remove a record from the waiting list. Consequently, the application must<br />

ensure that there is data available to be used for populating the record programmatically.<br />

Syntax<br />

PROCEDURE CREATE_QUERIED_RECORD;<br />

Built-in Type restricted procedure<br />

Enter Query Mode no<br />

Parameters<br />

none<br />

CREATE_QUERIED_RECORD restrictions<br />

• In blocks with a large number of records, this procedure can have side effects on disk I/O, memory<br />

allocation, or both.<br />

CREATE_QUERIED_RECORD examples<br />

/*<br />

** Built-in: CREATE_QUERIED_RECORD<br />

** Example: Fetch the next N records into this block. Record<br />

** count kept in Global.Record_Count.<br />

** trigger: On-Fetch<br />

*/<br />

DECLARE<br />

fetch_count NUMBER;<br />

FUNCTION The_Next_Seq<br />

RETURN NUMBER IS<br />

CURSOR next_seq IS SELECT uniq_seq.NEXTVAL FROM DUAL;<br />

tmp NUMBER;<br />

BEGIN<br />

OPEN next_seq;<br />

FETCH next_seq INTO tmp;<br />

CLOSE next_seq;<br />

RETURN tmp;<br />

END;<br />

BEGIN<br />

/*<br />

** Determine how many records <strong>Form</strong> <strong>Builder</strong> is expecting us to<br />

** fetch<br />

*/<br />

fetch_count := Get_Block_Property(’MYBLOCK’,RECORDS_TO_FETCH);<br />

FOR i IN 1..fetch_count LOOP<br />

/*<br />

63

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

Saved successfully!

Ooh no, something went wrong!