Post-query trigger doesn’t fire

Posted on 2002-06-10
Last Modified: 2012-06-27
On developer 2000 forms 6 , we have a form with 7 blocks, one of them is a control block ( not database), we use it to enter the specified record primary key and in the key-next-item it will execute query for the remind 6 database blocks and each block have a post-query trigger . the problem is that the post-query trigger does not fire for all blocks. even they have records and they retreive them.
Question by:suhaafaneh
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 22

Expert Comment

by:Helena Marková
ID: 7069335
It is very strange. Have you done some testing (put messages to post_query triggers ...)? Also use
Do_Key('Execute_Query');    instead of     Execute_Query;
LVL 48

Expert Comment

ID: 7069425
POST_QUERY trigger MUST reside in the block in which you fetch records. This is the case you described. Try also to put the focus on the block:
May be you leave the focus on your control block, but it has no postquery trigger.

Author Comment

ID: 7069667
we use the go_block and the do_key
and i used the debugger but it didn't fire the post-query for all database blocks just for 2 of them
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 48

Expert Comment

ID: 7069705
You either do not execute query against the block and simply insert records there or do not go to the block. Check carefully the logic ...
LVL 35

Accepted Solution

Mark Geerlings earned 75 total points
ID: 7069970
Is the main query executed in the blocks where you say the post-query trigger is not executed?  Check the properties of each of your block relations.  They should have:
"Automatic query" - Yes
"Deferred" - No

If "Deferred" is set to Yes, or "Automatic query" to No, the form will not execute the main query in the child block by default, and therefore the post-query will not fire either.  Does that explain what you are seeing?

Another possibility is that the main query in a child block did not find any records.  In that case, the post-query will not be executed for that child block.  

I've never seen a case in Oracle Forms where a query was executed in a block that retrieved at least one row and the post-query trigger in the block failed to fire.  If there are errors in the post-query trigger, or if it raises unhandled exceptions, then it may not give the results you expect.

Expert Comment

ID: 7072965
I've seen this before...and the cause was as Mark noted

Another possibility is that the main query in a child block did not find any records.  In that case,
the post-query will not be executed for that child block.  


Expert Comment

ID: 9170682
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Accept markgeer's comment as answer
Please leave any comments here within the next seven days.
EE Cleanup Volunteer

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
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

632 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