Press "Enter" to skip to content

CREATE_RECORD built-in in Oracle D2k / Oracle Forms 6i / 10g

CREATE_RECORD built-in in Oracle D2k / Oracle Forms 6i / 10g

Description
Creates a new record in the current block after the current record. Form Builder then navigates to the
new record.
Syntax
PROCEDURE CREATE_RECORD;
Built-in Type restricted procedure
Enter Query Mode no
Parameters
none
CREATE_RECORD examples
/*
** Built-in: CREATE_RECORD
** Example: Populate new records in a block based on return
** values from a query
*/
PROCEDURE Populate_Rows_Into_Block( projid NUMBER) IS
CURSOR tempcur( cp_projid NUMBER ) IS
SELECT milestone_name, due_date
FROM milestone
WHERE project_id = cp_projid
ORDER BY due_date;
BEGIN
/* Add these records to the bottom of the block */
Last_Record;
/* Loop thru the records in the cursor */
FOR rec IN tempcur( projid ) LOOP
/*
** Create an empty record and set the current row’s
** Milestone_Name and Due_Date items.
*/
Create_Record;
: Milestone.Milestone_Name := rec.milestone_name;
: Milestone.Due_Date := rec.due_date;
END LOOP;
First_Record;
END;