Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

How to pop up frm-40301 when the form is empty

Posted on 2009-04-24
7
Medium Priority
?
1,949 Views
Last Modified: 2013-12-19
I am using Oracle 8i and application version is 11.0.300.

I have a form, when I query the form from menu (query->enter) and input a ID, if the ID return nothing,  I want the following message popped up on the tool bar

frm-40301:query caused no record to be retrieved. Re-enter

but, now if empty form, it still have the following in the tool bar

Enter a query; please Ctrl+F11 to execute, F4 to Cancel

How to fix it?
0
Comment
Question by:wasabi3689
  • 3
  • 2
5 Comments
 
LVL 22

Expert Comment

by:Helena Marková
ID: 24292775
The message indicates, that your form is in an Enter-Query mode. This mode can be ended by using
exit_form;
built-in.

If you want to suppress that message then you can use On-Message trigger (on form level) and write there something like this:
if message_code = 40301 then
  null;
end if;
0
 

Author Comment

by:wasabi3689
ID: 24296178
I created on-message trigger and put it in either form level or block level or both, still doesn't work. When I query  an ID with empty form, still show
"Enter a query; please Ctrl+F11 to execute, F4 to Cancel"

My on-message trigger, just one line

exit_form;
0
 
LVL 22

Expert Comment

by:Helena Marková
ID: 24301842
On-Message trigger ought to be like this:
if message_code = 40301 then
  null; -- this suppress the message: "frm-40301:query caused no record to be retrieved. Re-enter"
end if;

But this message:
"Enter a query; please Ctrl+F11 to execute, F4 to Cancel"
seems to be your message when invoking enter-query mode.
0
 

Author Comment

by:wasabi3689
ID: 24306059
I tried it, still doesn't work
I add on-message to either form level or block level (for the form) or both, when I enter query mode (query->enter, then query->run), it still have the same message "Enter a query; please Ctrl+F11 to execute, F4 to Cancel", never change to "frm-40301:query caused no record to be retrieved. Re-enter" when queried an empty form.

In my on-message trigger, I have following

if message_code = 40301 then
  null;
end if;
0
 

Accepted Solution

by:
wasabi3689 earned 0 total points
ID: 24307358
I found the solution. Just remove on-message trigger completely. After that, it works.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Suggested Courses
Course of the Month14 days, 15 hours left to enroll

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question