DECLARE
vrow BINARY_INTEGER;
BEGIN
FOR i IN 1 .. apex_application.g_f01.COUNT
LOOP
vrow := apex_application.g_f01 (i);
UPDATE dept
SET dname = apex_application.g_f04 (vrow),
loc = apex_application.g_f05 (vrow)
WHERE empno = apex_application.g_f02 (vrow);
END LOOP;
END;
The easiest way to debug is to use:
1. Firefox
2. Firebug
Activate the firebug and use the HTML option to go over the elements (columns) in your tabular form. Firebug will show the associated array number and you can use that information to correct you code.

4 comments:
Hi
Is there a way to validate if an array exist ? For instance, if you have an apex collection with different cascading LOV, some of them are empty until the user hits the previous LOV. You want to validate that all the fields have been entered on Submit.
You can put a block inside your code with exception handling.
Thanks for your quick reply...Do you have a quick example of the code and where do you put it. For instance, i want to validate if (apex_application.g_f04 (i)) exist, if not I want to force the user to enter the value.
Thanks again
BEGIN
FOR i IN 1 .. apex_application.g_f02.COUNT
LOOP
DECLARE
v_value VARCHAR2 (4000);
v_error VARCHAR2 (4000);
BEGIN
v_value := apex_application.g_f04 (i);
EXCEPTION
WHEN NO_DATA_FOUND
THEN
v_error := 'Array doesn''t exist.';
RETURN v_error;
END;
END LOOP;
END;
Post a Comment