Solved

forms / trigger question

Posted on 1998-04-05
13
1,733 Views
Last Modified: 2008-02-01
Hello all you Oracle forms / trigger gurus,

What's the default pl/sql action of a key-entqry (enter query)?
What's the default pl/sql action of a key-exeqry (execute query)?

I need to modify the trigger action of a key-exeqry at block
level. I assume that during a key-entqry the data is collected
from the keyboard that allows a select statement to be constructed
and executed when key-exeqry trigger is fired. How do I intervene
to add an extra select statement?

Thanks,
Martin Meadows
0
Comment
Question by:mmeadows
13 Comments
 

Expert Comment

by:jih
Comment Utility
Hi Martin,

The default pl/sql action of 'KEY-ENTQRY' is ENTER_QUERY
The default pl/sql action of 'KEY-EXEQRY' is EXECUTE_QUERY

I would suggest that you modify the PRE-QUERY trigger instead of the KEY-EXEQRY. To find out more about how modify the PRE-QUERY trigger, search Forms Online Help for 'Pre-Query'. Make sure to read the topic 'Controlling Queries with Pre-Query and Post-Query Triggers'.

/Jesper
0
 

Author Comment

by:mmeadows
Comment Utility
I don't seem to have the doc you mentioned. Is this doc unique
to post sqlforms30? Since you suggested I use the pre-query trigger I tried to do something like this:

select * from bill_material_hours
  where bmh_so_# = :block1.bmm_so_#
  and bmh_so_item_# = :block1.bmm_so_item_#
  and bmh_so_chg_# = :block1.bmm_so_chg_#;

I'm trying to work this select statement into block5.
The selected rows therefore depend on data that
was entered in block1. Unfortunately, I can't
compile the select statement! It's expecting
the keywork INTO after the *. This is a V3 trigger.
so why won't it work without INTO?

Thanks,
Martin Meadows


0
 
LVL 1

Expert Comment

by:slinky
Comment Utility
Are we to assume you are working with Forms v3?
If not which version of forms are we looking at?
0
 

Author Comment

by:mmeadows
Comment Utility
Yes, sql*forms v3. Sorry I didn't make that clear from the start.

Martin

0
 
LVL 2

Expert Comment

by:frankr
Comment Utility
It would help to know what behavior you're trying to achieve.  Are you trying to populate block5 based on a query in block1?

If so, you want your query in a post-query trigger on block1, and yes you need the INTO clause if you want to populate fields in the form from the query.  (Even if you DON'T need it, explicit code is generally more readable - I'm PAINFULLY familiar with trying to read the messy, undocumented code of others.)

Incidentally, the difference between a key- trigger and the corresponding trigger 'function' is that the key trigger will only fire as a response to the 'key sequence' (i.e. if the operator strikes the query key, however that's mapped), and the 'function' is what is called, by default.  The pre- or post- type triggers (e.g. pre-query) are executed whenever that function is performed (even in response to a programmatic event).

Note also that, if you use the key- trigger, your code will REPLACE the standard behavior (i.e. the call to the function); for that reason, you generally will want to finish a key- trigger with the function call explicitly, e.g.

key-exeqry
  .
  .
  your code here
  .
  .
  execute_query;
end;
0
 

Author Comment

by:mmeadows
Comment Utility
Sorry I took so long to respond. Have moved on to other things.
Frankr & Jih: thanks for the assistance & the clarification. I
guess I need to give someone credit for answering my question
now but I don't have an option to accept the answers on my screen. All I can do is enter this comment & submit it.

By the way, yes, Frankr, I was trying to populate block5 with
stuff from block1.
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 2

Expert Comment

by:frankr
Comment Utility
The reason you don't have an 'accept answer' choice is that none of us have submitted any of our feedback as an 'Answer', aside from the first from Jesper that you rejected.  If you think any of the comments are most appropriate for acceptance as an answer, why don't you tell whichever one of us you choose to submit something as an answer, which will give you a chance to accept it.

If you really solved your question yourself, or if nobody in particular can be credited with the answer (there's no way to split awards), you could ask the moderator to just close the question for you without any award.
0
 

Author Comment

by:mmeadows
Comment Utility
Frankr, I think you should get credit for providing the most
help on this so submit something as an answer & I'll grade it.
Thanks for the help. Marty

By the way, I have a couple of other open questions that I'd
like to have the moderator to close. How is that done? In a comment?
0
 
LVL 2

Accepted Solution

by:
frankr earned 100 total points
Comment Utility
I was going to tell you to go to the Customer Service topic to request help with the other questions, but I just got back from there and I think you've figured that out for yourself.

Always glad to help.

BTW, if you're looking for other places to post questions, there's the IOUG-A website discussion groups.  They're open to non-members of IOUG-A (if you aren't a member).  ODTUG has a forum, too, I believe, but I think that one's members-only.

www.iouga.org and www.odtug.com
0
 

Author Comment

by:mmeadows
Comment Utility
thanks to of you for helping out & thanks for the pointer to iouga frankr.

M. Meadows
0
 

Author Comment

by:mmeadows
Comment Utility
Why does this question now say "10 points" at the top? I gave 100 points for it. Also, Frankr, the iouga web address you shared with me isn't working ...
0
 
LVL 2

Expert Comment

by:frankr
Comment Utility
Oops.  Sorry, should be www.ioug.org (somehow the Americas division of IOUG managed to hang onto the original domain when they divvied up the world into three big pieces).  I shouldn't ever trust my memory.

The points always drop to 10% of original for those who want to review answered questions.  Or you could look at it that the person who wanted the answer the most (the person that asked it) has to cough up 10x as many points.
0
 

Author Comment

by:mmeadows
Comment Utility
frankr, thanks for that last little tid-bit of info. it's much appreciated.

also note, I found the ioug.org address on my own when I did a web search for iouga. thanks for your reply though!

martin
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
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 explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
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

771 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now