Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 5 of 5 total |
InTransaction? |
Thu, Nov 20 2008 5:05 AM | Permanent Link |
Tiago Ameller | Table A has
Detail Table(s) B has Detail Table(s) C In TableA_BeforeDelete I start a restricted transaction to cascade delete rows in B tables. In TableB_BeforeDelete I start a restricted transaction to cascade delete rows in C tables. The problem is in TableB_BeforeDelete I can't know there is already an active transaction (same thing as InTransaction at TEDBDatabase component). Since rows in Table(s) C can be deleted due both TableA or TableB row deletion, how can be it done? Thanks! |
Thu, Nov 20 2008 7:14 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Tiago
Can rows in table B be deleted without deleting rows in table A and can rows in table C be deleted without deleting rows in table B? Roy Lambert [Team Elevate] |
Thu, Nov 20 2008 1:10 PM | Permanent Link |
Tiago Ameller | Roy,
>Can rows in table B be deleted without deleting rows in table A and can rows in table C be deleted without deleting rows in table B? It's a true cascade. If you delete A then B and C must be deleted. If you delete B then C must be deleted. If you delete C then nothing more occurs. And of course, deleting B don't affects A and deleting C don't affects A nor B. |
Thu, Nov 20 2008 1:15 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Tiago,
<< The problem is in TableB_BeforeDelete I can't know there is already an active transaction (same thing as InTransaction at TEDBDatabase component). Since rows in Table(s) C can be deleted due both TableA or TableB row deletion, how can be it done? >> Right now you have to attempt the START TRANSACTION and catch the exception using an EXCEPTION block. I've got an INTRANSACTION() function on the list for 2.03 to resolve this. -- Tim Young Elevate Software www.elevatesoft.com |
Thu, Nov 20 2008 1:45 PM | Permanent Link |
Tiago Ameller | Tim,
<< I've got an INTRANSACTION() function on the list for 2.03 to resolve this.>> This will definitely be the solution! -- 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 |