Post-query trigger doesn’t fire

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.
Who is Participating?
Mark GeerlingsConnect With a Mentor Database AdministratorCommented:
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.
Helena Markováprogrammer-analystCommented:
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;
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.
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

suhaafanehAuthor Commented:
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
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 ...
jtriftsMI and AutomationCommented:
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.  

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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.