Skip to Main Content

Oracle Forms

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

DELETE_RECORD behaviour

443560Jul 5 2010 — edited Jul 7 2010
Hello,

I have Oracle forms 10g R2, on KEY_DELREC trigger at form level I wrote following code
declare
	exist_chk number:= 0;
	region_cd varchar2(10) := null;
	alert_butt number := 0;
	curblk VARCHAR2(30):= :System.Cursor_Block; 
	cannot_del_parent EXCEPTION;
	PRAGMA Exception_Init (cannot_del_parent, -2292);
	v_os_user varchar2(40) := null;
	
	begin
		v_os_user := NAME_IN('GLOBAL.USER_ID');

if   not accessible(v_os_user, 'SEC_MODULE', 'DELETE') then
		  msgbox.showdisplay(0,'Error Deletion', 'You are not allowed to delete records');
		  RAISE FORM_TRIGGER_FAILURE;
else
				msgbox.showreturn(1,'Authentication.. ', 'Do You Realy Want to Delete', alert_butt);
					
				IF alert_butt = ALERT_BUTTON1 THEN

				  Delete_Record;
					POST;
								
								IF :SYSTEM.FORM_STATUS = 'QUERY' THEN
									message('Record Deleted Successfully',no_acknowledge);
									COMMIT_FORM;
								ELSE
						  	  msgbox.showdisplay(0,'Error Saving', 'An Error Prevented to Delete Record.-2');
									RAISE Form_Trigger_Failure;	
								END IF; 
				
				END IF;
end if;
		EXCEPTION
			WHEN cannot_del_parent THEN
				msgbox.showdisplay(0, 'Constraint...', 'You Cannot Remove Record, Child Record Exist');
			RAISE Form_Trigger_Failure;
	end;
My question is when DELETE_RECORD built-in failed for any reason despite of that Oracle forms remove that record from screen(I mean GUI form) although it's not deleted from database but it disappear from screen it makes confusion how can I avoid this.

Any one have idea.

Thanks and Regards,
Syed Khawar
This post has been answered by CraigB on Jul 6 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 4 2010
Added on Jul 5 2010
6 comments
13,604 views