Databases Reference
In-Depth Information
WHEN OTHERS
THEN
p message := p message
|| '<br/>'
|| 'Row: '
|| i
|| ' > '
|| SQLERRM;
p message := LTRIM (p message, '<br/>');
END;
END LOOP;
IF v ins count > 0 OR v upd count > 0
THEN
p message :=
p message || '<br/>'
|| v ins count
|| ' row(s) inserted. '
|| v upd count
|| ' row(s) updated.';
END IF;
p message := LTRIM (p message, '<br/>');
EXCEPTION
WHEN OTHERS
THEN p message := SQLERRM;
END save emp coll custom;
PROCEDURE delete emp coll custom (p message OUT VARCHAR2)
IS
v row INTEGER;
v count INTEGER := 0;
v collection VARCHAR2 (40) := 'EMP DEPT';
BEGIN
FOR i IN 1 .. apex application.g f01.COUNT
LOOP
v row := apex application.g f01 (i);
apex collection.update member
(p collection name => v collection,
p seq => apex application.g f02(v row),
p c011 => 'Y');
v count := v count + 1;
END LOOP;
p message := v count || ' row(s) deleted.';
END delete emp coll custom;
Before you can start testing this code, you will create two on submit processes on application
page 3:
Update Collection : The process for updating existing and adding new rows. This
process will be conditional using the following PL/SQL Expression:
:REQUEST IN ('ADD', 'SUBMIT')
Search WWH ::




Custom Search