Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Transactions
Message
From
08/12/2008 16:05:11
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
 
 
To
08/12/2008 15:02:45
Rick Forbes
Brotherhood of Maintenance of Way Employ
Royal Oak, Michigan, United States
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Environment versions
Environment:
C# 2.0
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01366064
Message ID:
01366086
Views:
13
Rick,

>I have a maintenance form that maintains Table A. I would like to log the before and after image of each changed column in Table A to Table B. I have placed the logic to do this into Table A’s HookPreSave method. The problem I am having is that I cannot find a way to get Table B to participate in Table A’s Transaction. If there is an error in the validation of Table A changes are not applied to Table A however these changes are being logged to Table B even though Table A has not passed the validation process. I would like to know how to get Table B to update only if Table A successfully updates. Also, if either table fails to successfully update then I want them both to rollback. They must remain in sync. AutoUseTransactions is set to true on Table A’s BO.

I just saw a post from Kevin about how to do this on this board a couple of weeks back.. You might try a search on Transactions to find it. I assume you read the "Working with Transactions" section under Data Access with MM .NET in the Dev Guide. If business objects are related they will roll in the transactions together automatically. However you could manually call the transactionBegin, Commit, and Rollback of each as needed.
Tim
Timothy Bryan
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform