Deletes the indicated row or all rows of the given record group. Oracle Forms automatically decrements the row numbers of all rows that follow a deleted row. When rows are deleted, the appropriate memory is freed and available to Oracle Forms.
If you choose to delete all rows of the group by supplying the ALL_ROWS constant, Oracle Forms deletes the rows, but the group still exists until you perform the DELETE_GROUP subprogram.
When a single row is deleted, subsequent rows are renumbered so that row numbers remain contiguous.
PROCEDURE DELETE_GROUP_ROW
(recordgroup_id RecordGroup,
row_number NUMBER);
PROCEDURE DELETE_GROUP_ROW
(recordgroup_name VARCHAR2,
row_number NUMBER);
Built-in Type unrestricted procedure
Enter Query Mode yes
This Built-in cannot be used to delete rows from a static record group.
/*
** Built-in: DELETE_GROUP_ROW
** Example: Delete certain number of records from the tail
** of the specified record group.
*/
PROCEDURE Delete_Tail_Records( recs_to_del NUMBER,
rg_name VARCHAR2 ) IS
rg_id RecordGroup;
rec_count NUMBER;
BEGIN
/*
** Check to see if Record Group exists
*/
rg_id := Find_Group( rg_name );
/*
** Get a count of the records in the record group
*/
rec_Count := Get_Group_Row_Count( rg_id );
IF rec_Count < recs_to_del THEN
Message('There are only '||TO_CHAR(rec_Count)||
' records in the group.');
RAISE Form_Trigger_Failure;
END IF;
/*
** Loop thru and delete the last 'recs_to_del' records
*/
FOR j IN 1..recs_to_del LOOP
Delete_Group_Row( rg_id, rec_Count - j + 1 );
END LOOP;
END;