Re: table level trigger doesn't like 'execute_query'

From: M Hamilton <mhamilton_at_usgs.gov>
Date: 5 Feb 2004 08:33:15 -0800
Message-ID: <7ce65461.0402050833.371ef650_at_posting.google.com>


I post the answer to my question for historical purpose and to help others in the future. (See original message for the problem.) This answer was received from Tony Andrews at another Forum.

TONY: EXECUTE_QUERY and SYNCHRONIZE are meaningful only within Forms. They are meaningless in a database trigger, or anywhere else outside of Forms. All your database trigger can do is manipulate data in the server, and optionally raise an exception to indicate an error.

ME: So since the table level trigger can't requery. I guess I could put a button on the form that would be solely for requerying the current row in the block. This seems kind of cumbersome. Might you have any ideas or suggestions on this?

TONY: Difficult to say without knowing quite what you want to do. If a database trigger has just been fired, then your form must have issued a POST or COMMIT - so why not just add EXECUTE_QUERY to the end of the trigger that caused the POST or COMMIT?

ME: The COMMIT was done by selecting the SAVE icon/button at the top of the form on the default toolbar. When the SAVE icon was selected was when the table level trigger fired. Can I add code to this SAVE?

TONY: Yes. The SAVE icon is mapped to the KEY-COMMIT trigger. If your form doesn't already have a KEY-COMMIT trigger you can create one that looks like this:

BEGIN
COMMIT_FORM;
[Quoted] -- Your additional processing here:
EXECUTE_QUERY;
END; Received on Thu Feb 05 2004 - 17:33:15 CET

Original text of this message