Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Transactions
Message
De
08/12/2008 16:05:11
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
 
 
À
08/12/2008 15:02:45
Rick Forbes
Brotherhood of Maintenance of Way Employ
Royal Oak, Michigan, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
Versions des environnements
Environment:
C# 2.0
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01366064
Message ID:
01366086
Vues:
12
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform