FRM-40738 ERROR IN ORACLE FORMS [message #655244] |
Thu, 25 August 2016 10:55  |
 |
Soulami
Messages: 23 Registered: August 2016
|
Junior Member |
|
|
Hi ,
I am getting an error when i click of save/execute button of a screen as FRM 40738 : Argument 1 of predefined procedure GO_BLOCK cant be null.
Below is my code on the click of when button pressed trigger
declare
res number;
begin
Check_Fehlkz_Code(res);
if res = 1 then
p_msg_ppslib('WARNUNG', stl.gtext(:parameter.stlapp, :parameter.stlmod, 25889));
raise form_trigger_failure;
else
Toolbar.beenden;
end if;
exception
when FORM_TRIGGER_FAILURE then
RAISE FORM_TRIGGER_FAILURE;
when others then
null;
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: FRM-40738 ERROR IN ORACLE FORMS [message #655258 is a reply to message #655257] |
Thu, 25 August 2016 14:33   |
 |
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
Simply remove the whole EXCEPTION section. The way you use it is useless, it does nothing good; it just successfully hides any possible error. Let Forms raise an excaption if it happens; doing so, you'll (at least) know what went wrong. Then, if necessary, handle it. Using WHEN OTHERS is in most cases wrong (did you read contents behind the link Michel provided?).
As of your initial question: there's no GO_BLOCK in this piece of code, so the error must be somewhere else. Is it, perhaps, CHECK_FEHLKZ_CODE? What does it do?
Which Forms version do you use? Because, if you can't find the culprit and use Forms 9i onward, set the breakpoint and run the form in debug mode. Execute it step by step, until you find the line that causes the error.
Or, possibly even simpler (and faster), go to Edit menu and Find a string in your PL/SQL procedures - search for GO_BLOCK in there. Most probably, there aren't that many GO_BLOCKs in the form so you might see the error cause instantly, i.e. GO_BLOCK without an argument. It should contain the target block, such as
|
|
|
|
|
|
|
|
|
Re: FRM-40738 ERROR IN ORACLE FORMS [message #655431 is a reply to message #655425] |
Wed, 31 August 2016 03:16   |
cookiemonster
Messages: 13965 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
Soulami wrote on Wed, 31 August 2016 07:45hello,
Because of raise?
Raise form_trigger_failure?
Yes. Raise causes oracle to stop running the current block of code and crash out to the first exception handler it can find. So any code after a raise can never be run.
Also when a procedure ends in error it doesn't pass back out parameters.
If you want the out parameter set you can't use raise.
|
|
|
|
|
Re: FRM-40738 ERROR IN ORACLE FORMS [message #655455 is a reply to message #655439] |
Wed, 31 August 2016 05:46   |
cookiemonster
Messages: 13965 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
Soulami wrote on Wed, 31 August 2016 11:08okay, got it.
But in that case the warning would be by passed, if i remove the raise form_trigger_failure.Right?
Which one? You appear to have two.
The current code bypasses the outer one because the out parameter is never set.
You should either:
Have Check_Fehlkz_Code call p_msg_ppslib and do a raise and not bother with an out parameter and not have the trigger do either.
Or have the trigger call p_msg_ppslib and do a raise and remove those from Check_Fehlkz_Code and just have it return the out parameter.
You're trying to do both, which makes no sense.
|
|
|
|