Solved

Post-query trigger doesn’t fire

Posted on 2002-06-10
7
2,022 Views
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.
0
Comment
Question by:suhaafaneh
[X]
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
7 Comments
 
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;
0
 
LVL 48

Expert Comment

by:schwertner
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:
GO_BLOCK('the_block_name');
execute_query;
May be you leave the focus on your control block, but it has no postquery trigger.
0
 

Author Comment

by:suhaafaneh
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
0
MS Dynamics Made Instantly Simpler

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

 
LVL 48

Expert Comment

by:schwertner
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 ...
0
 
LVL 35

Accepted Solution

by:
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
and
"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.
0
 
LVL 4

Expert Comment

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

<snip>
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.  
</snip>

Regards,
JT
0
 
LVL 5

Expert Comment

by:jpkemp
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.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
jpkemp
EE Cleanup Volunteer
0

Featured Post

Industry Leaders: 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!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Sybase and replication server 13 79
DECLARATION OF CURSOR IS INCOMPLETE OR MALFORMED 5 70
Password_rules_securitty.. 12 46
MS SQL Server Management Studio R2 4 58
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
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 how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video shows how to recover a database from a user managed backup

738 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