Home » Developer & Programmer » Forms » Problem in saving, no errors shown and neither record is inserted (Oracle Forms 6i, Oracle DB 10.0.2, Win. 7)
Problem in saving, no errors shown and neither record is inserted [message #594085] Fri, 23 August 2013 05:56 Go to next message
shivakm
Messages: 5
Registered: September 2012
Location: Muscat, Sultanate of Oman
Junior Member
Hi Gurus,

I have used a template to create a form which has 3 below tables / blocks in the form:
1. 'OIFC_INV_DEVICE_TYPES'
2. 'OIFC_INV_SECTIONS'
3. 'OIFC_INV_DEVICE_MASTER'


The 1st 2 tables are used only to fetch values through a LOV and no insert happen during save and the 3rd has initial values defined and has to insert these values while click on the save (when button pressed trigger) button which has the below pasted code, but no error is thrown and neither the record is inserted, can anyone please suggest what could be wrong here.....


declare
al_id alert:=FIND_ALERT('popup');
al number;
insert_val varchar2(500);
increment_value number;
MAX_VALUE NUMBER;
rec_check varchar2(1);
RCOUNT NUMBER;
success_msg varchar2(100);
begin
	go_block('OIFC_INV_DEVICE_TYPES');
	go_block('OIFC_INV_SECTIONS');
	go_block('OIFC_INV_DEVICE_MASTER');
	
	 if :global.click_flag = 'add' then
			null;
			
  end if;
   if :global.click_flag is null then
			:titl.msg_fld:='No options! select your options';
   end if;
   if :global.click_flag = 'query' then
   			:global.Err:=0;
      	:global.click_flag := 'query';
      	enable_query;
   elsif :global.click_flag = 'delete' then
   		:global.Err:=0;
         COMMIT_MSG;
      if :global.err <> 1 then         
         :global.del:=0;
         :global.click_flag := 'delete';
         enable_delete;
      end if;   
   else
	 if :global.click_flag = 'add' then
	 	:global.Err:=0;
		 COMMIT_MSG;
		 :global.click_flag := 'add';
	   enable_add;
     elsif :global.click_flag = 'modify' then
     	:global.Err:=0;

     COMMIT_MSG;
     :global.click_flag := 'modify';
     enable_modify;
   end if;
   end if;
    go_block('OIFC_INV_DEVICE_TYPES');
    go_block('OIFC_INV_SECTIONS');    
    go_block('OIFC_INV_DEVICE_MASTER');

   if to_number(:global.err) != 1 then 
     CLEAR_BLOCK(NO_VALIDATE);
    :global.err := 0;
   IF UPPER(:GLOBAL.CLICK_FLAG) IN ('DELETE','MODIFY','QUERY') THEN 
   IF :SYSTEM.MODE != 'ENTER-QUERY' THEN 
      ENTER_QUERY;
   END IF;
END IF;
 else
   :global.err := 0;
   end if;
end;



Re: Problem in saving, no errors shown and neither record is inserted [message #594096 is a reply to message #594085] Fri, 23 August 2013 07:59 Go to previous message
cookiemonster
Messages: 13920
Registered: September 2008
Location: Rainy Manchester
Senior Member
I don't see anything in that code that would cause forms to save records?
What do you think is going to do that job?
Previous Topic: Can a form Function be called from Record group - Form 6i
Next Topic: key_next_item trigger
Goto Forum:
  


Current Time: Fri Apr 26 03:10:23 CDT 2024