When called from an On-Fetch trigger, creates a record on the block's waiting list. The waiting list is an intermediary record buffer that contains records that have been fetched from the data source but have not yet been placed on the block's list of active records. This Built-in is included primarily for applications using transactional triggers to run against a non-ORACLE data source.
Note that there is no way to remove a record from the waiting list. Consequently, the application must ensure that there is data available to be used for populating the record programmatically.
PROCEDURE CREATE_QUERIED_RECORD;
Built-in Type restricted procedure
Enter Query Mode no
none
/*
** Built-in: CREATE_QUERIED_RECORD
** Example: Fetch the next N records into this block. Record
** count kept in Global.Record_Count.
** Trigger: On-Fetch
*/
DECLARE
fetch_count NUMBER;
FUNCTION The_Next_Seq
RETURN NUMBER IS
CURSOR next_seq IS SELECT uniq_seq.NEXTVAL FROM DUAL;
tmp NUMBER;
BEGIN
OPEN next_seq;
FETCH next_seq INTO tmp;
CLOSE next_seq;
RETURN tmp;
END;
BEGIN
/*
** Determine how many records Oracle Forms is expecting us to
** fetch
*/
fetch_count := Get_Block_Property('MYBLOCK',RECORDS_TO_FETCH);
FOR i IN 1..fetch_count LOOP
/*
** Create the Queried Record into which we'll deposit
** the values we're about to fetch;
*/
Create_Queried_Record;
:Global.Record_Count := NVL(:Global.Record_Count,0)+1;
/*
** Populate the item in the queried record with a
** sequence function we declared above
*/
:myblock.numbercol := the_next_seq;
END LOOP;
END;