Home » Developer & Programmer » Forms » frm-40405 (forms 10g , db 10g patch 2)
frm-40405 [message #500679] Tue, 22 March 2011 15:01 Go to next message
dclarkarchcoalcom
Messages: 1
Registered: March 2011
Location: St Louis
Junior Member
I am getting an error whenever I attempt to save a record.

My form has a number of none table datablocks and one database block. I have traced the program and only one commit_form is being entered and I keep getting the 40405 error.

I have attempted to trap in an form level on-error trigger but that doesn't fire for this error. Please help.
Re: frm-40405 [message #500692 is a reply to message #500679] Tue, 22 March 2011 16:27 Go to previous messageGo to next message
Littlefoot
Messages: 21439
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
It appears that there are no changes within the data block at the moment you perform commit. So - do you really have to commit? Perhaps you could check it with
if :system.form_status = 'CHANGED' then
   commit_form;
end if;

Otherwise, if commit is there because you explicitly modified database (with, for example, INSERT or UPDATE statements), then you might try with
standard.commit;
instead of COMMIT_FORM.
Re: frm-40405 [message #625957 is a reply to message #500692] Thu, 16 October 2014 23:09 Go to previous messageGo to next message
babsoni
Messages: 3
Registered: May 2010
Location: Bamako - Mali
Junior Member

https://groups.google.com/forum/#!topic/comp.databases.oracle.tools/fVgJxf_twE8
In case anyone is interested ... I was looking in the wrong place, but I
finally found the problem. The spurious 40405 messages were the result of
the fact that this is a multi-form application. Several forms stay open at
the same time. Among other changes that I made, I changed the open_form call
to "no_session" rather than "session". At the time I did not catch the fact
that as a result, a commit on any open form caused the system to attempt to
commit all open forms. Since nothing was changing on the other forms, they
were returning a "No changes to apply" message (40405). I couldn't find the
40405 message on form I was working with because the form I was looking at
wasn't raising the error. Instead, it was being raised on the background
forms and when I got back to back messages, the message line pushed the
message to an alert box. Once I identified the cause, I could actually
switch between forms and see the 40405 message on the message line of each
form. As a former DBA, I don't want multiple sessions out there so I want to
leave the open_form as "no_session". The workable but not elegant solution
that I came up with was to put an ON-ERROR trigger at the form level on all
forms to trap the 40405 message.
Re: frm-40405 [message #671748 is a reply to message #625957] Mon, 17 September 2018 15:11 Go to previous messageGo to next message
suh_sh
Messages: 22
Registered: January 2006
Location: Jordan
Junior Member
I found the best solution .
Form A called Form B .
put this code in Form A :

ON-ERROR trigger (form level) :
declare
errnum number := error_code;
errtxt varchar2(80) := error_text;
errtyp varchar2(3) := error_type;
begin
IF (errnum = 40405 ) THEN NULL ;
else
Message(errtyp||'-'||to_char(errnum)||': '||errtxt);
end if;
end;
Re: frm-40405 [message #671749 is a reply to message #671748] Mon, 17 September 2018 15:16 Go to previous message
Michel Cadot
Messages: 65844
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

The solution you "found" is what has been posted 4 years ago.

Previous Topic: utl_tcp Error
Next Topic: Display pdf file in Oracle Forms 10g
Goto Forum:
  


Current Time: Thu Oct 18 04:32:38 CDT 2018