Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 8 of 8 total |
Disable trigger in trigger itself |
Thu, Oct 25 2018 10:43 AM | Permanent Link |
Mike | Hi,
Trigger A on table B is called and runs the statements. One of the statements updates table B. Can I disable trigger A before this statement? Will it not stop the current trigger processing? |
Thu, Oct 25 2018 11:04 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Mike
Nasty case of recursion you have there. Look at DISABLE TRIGGERS in the OLH. Roy Lambert |
Thu, Oct 25 2018 11:09 AM | Permanent Link |
Mike | Hi Roy,
Which information in the online help are you referring to? Would using a seperate procedure including disabling triggers for these statements be better? |
Thu, Oct 25 2018 11:10 AM | Permanent Link |
Mike | Or moving the statements to a different trigger?
|
Fri, Oct 26 2018 2:34 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Mike
Either the pdf manual - search for DISABLE TRIGGERS or the help in EDBManager. Roy Lambert |
Fri, Oct 26 2018 2:39 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Mike
Ideally you need to understand why the recursion is there and stomp on it. Recursion is a great tool in a limited number of circumstance but from the very little information provided it seems as though this one will bite you. Tty mapping the system flow and see if it can be avoided. Roy Lambert |
Sun, Oct 28 2018 12:04 PM | Permanent Link |
Mike | Thanks Roy.
Will check it out. |
Tue, Oct 30 2018 1:22 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Mike,
<, Trigger A on table B is called and runs the statements. One of the statements updates table B. Can I disable trigger A before this statement? Will it not stop the current trigger processing? >> The short answer is yes, but make sure to use a BEGIN..FINALLY block to restore the triggers, or you'll have a problem on your hands. Also, for performance purposes, if you're doing any querying or calling other procedures/functions in the triggers, look into using the statement/procedure caching in EDB 2.28: https://www.elevatesoft.com/manual?action=viewtopic&id=edb2sql&topic=Buffering_Caching "Per-Session SQL Statement and Function/Procedure Caching" https://www.elevatesoft.com/manual?action=viewprop&id=edb2&product=rsdelphiwin32&version=10T&comp=TEDBSession&prop=SQLStmtCacheSize https://www.elevatesoft.com/manual?action=viewprop&id=edb2&product=rsdelphiwin32&version=10T&comp=TEDBSession&prop=FuncProcCacheSize These properties can seriously improve performance in such cases (and especially with recursion). Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Tuesday, April 30, 2024 at 03:55 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |