Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Oracle Forms 9 Problem
I am learning forms with Oracle 9i and have run into a problem.
The following code runs just fine in a Save Button with a WHEN -BUTTON-PRESSED trigger that inserts a record from a stacked single record block (does not allow updates or deletes from it).
DECLARE
edit_alert alert; show boolean := false; message varchar2(150) := 'You Must Fill the Following Fields:'; choice number; BEGIN IF :add_region.region_id IS NULL THEN show := true; message := message || CHR(10) || '----- Region Id'; END IF; IF show = true THEN edit_alert := Find_Alert('EDIT'); set_alert_property(edit_alert, ALERT_MESSAGE_TEXT, message); choice := show_alert(edit_alert); ELSE insert_record; commit; clear_block; go_block('regions'); END IF;
I figure that it has something to do with :regions.region_id within a multi-line block and the if statement not knowing the current record. I have searched and searched for a solution with no luck. Can anyone help?
DECLARE
edit_alert alert; show boolean := false; message varchar2(150) := 'You Must Fill the Following Fields:'; choice number; BEGIN IF :regions.region_id IS NULL THEN show := true; message := message || CHR(10) || '----- Region Id'; END IF; IF show = true THEN edit_alert := Find_Alert('EDIT'); set_alert_property(edit_alert, ALERT_MESSAGE_TEXT, message); choice := show_alert(edit_alert); ELSE update_record; commit; END IF;
Michael Received on Wed Apr 26 2006 - 16:01:30 CDT
![]() |
![]() |