Home » Developer & Programmer » Forms » Suppress Do you want to save changes message
Suppress Do you want to save changes message [message #78993] Thu, 11 April 2002 08:34 Go to next message
Naseem Ahmad
Messages: 3
Registered: April 2002
Junior Member
Hi,

I have a master/detail blocks in my form. When I insert a record into the master block and then enter few records in the detail block and come back to master record and insert on more record into the master block I get Do you want to save chages? I do not want to save/commit changes just yet. Is there any way we can commit changes all at the same time.

Please help...
Re: Suppress Do you want to save changes message [message #78997 is a reply to message #78993] Thu, 11 April 2002 23:55 Go to previous messageGo to next message
nik
Messages: 55
Registered: January 2002
Member
hi,
if u wanted to just supress message u would use an on-error trigger to capture the frm-number and just nullify it.

nik
Re: Suppress Do you want to save changes message CODE FOR U [message #78998 is a reply to message #78997] Fri, 12 April 2002 00:06 Go to previous messageGo to next message
nik
Messages: 55
Registered: January 2002
Member
here u are, put at block level.

declare

errnum number := error_code;
errtxt varchar2(80) := error_text;
errtyp varchar2(3) := error_type;

begin

if errnum in (40401) then null; /* suppresses no changes to save message on commit normal processing*/
else
message(errtyp||'-'||to_char(errnum)||': '||errtxt);
raise form_trigger_failure;
end if;

end;

nik..
Re: Suppress Do you want to save changes message [message #79000 is a reply to message #78997] Fri, 12 April 2002 04:41 Go to previous messageGo to next message
Naseem Ahmad
Messages: 3
Registered: April 2002
Junior Member
Thanks nik for your help.

I have tried the code block in on-error, on-message and post-block on form level but i am getting the same message Do you want to save changes? I have tried :system.message_level :=25; in When-New-Form_Instance trigger but in vain.

Any more suggessions?

Thanks.
Re: Suppress Do you want to save changes message [message #79003 is a reply to message #78997] Fri, 12 April 2002 07:51 Go to previous messageGo to next message
nik
Messages: 55
Registered: January 2002
Member
Naseem,
check following points;

1. you have put on-error trig at block level
i.e. the block you leave to return to master
block. This is where u should put trig.
2. remove error trig and make sure that the
error code u get is 40401 and frm(or post reply with error message u r getting.
3. you have no other on-error trig e.g at item level.
Re: Suppress Do you want to save changes message [message #79009 is a reply to message #78997] Sat, 13 April 2002 00:11 Go to previous messageGo to next message
Subhash
Messages: 105
Registered: October 2001
Senior Member
Hi,

Try this ... Forms_Ddl('commit');

regards
Subhash
Re: Suppress Do you want to save changes message [message #79013 is a reply to message #78997] Sun, 14 April 2002 00:05 Go to previous messageGo to next message
Naseem Ahmad
Messages: 3
Registered: April 2002
Junior Member
sorry guys its not working.
I think the problem is that i am not getting any error message since it is normal working of the form. When i insert new record in the master block and get to the child block then the relational key is null. Oracle relates both blocks with null values. Normally in my form i have pre-insert trig on the master block which works out the next id and insert the new calculated value in the id item in the master block which automatically updates child records with the news values and insert news records in the child block too.
Now how com we can move to the new record in the master block before updating the relational key.

Still need help.
Thanks
Try Again With Following In The PRE_FORM Trigger [message #79671 is a reply to message #78997] Tue, 02 July 2002 00:05 Go to previous message
Saiful Alam Saroar
Messages: 1
Registered: July 2002
Junior Member
Add The Following In The PRE_FORM Trigger

:SYSTEM.MESSAGE_LEVEL:=25;
Previous Topic: No Changes to Save Error
Next Topic: Error while Connection to Oracle
Goto Forum:
  


Current Time: Wed Apr 24 12:16:43 CDT 2024