Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Transactions with Child-Parent-Grandparent
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Transactions with Child-Parent-Grandparent
Environment versions
Environment:
C# 1.1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01053421
Message ID:
01053421
Views:
53
I am using the Mere Mortals business objects to control transactions with related business objects.
1) In my test I relate a child business object to a parent business object and relate the parent to a grandparent business object.
2) I get an empty dataset into each of the business objects
3) I add a new record to each of the datasets
4) I start a transaction on the grandparent object with TransactionBegin()
5) I call SaveDataSet() on the grandparent, which automatically calls it on the parent and child objects
6) I rollback the transaction by calling TransactionRollback() on the grandparent.

I would expect this to rollback the new records in all 3 tables. It does rollback on the grandparent and parent tables, but leaves the new record in the child table.

I thought maybe the transaction was only good in 2 generations (the parent and grandparent) so I tried to simultaneously start another transaction at the parent level so I could rollback both transactions in my test. But I get an error saying that the connection cannot have multiple transactions open in it.

Any thoughts?

Matthew J. Price
Next
Reply
Map
View

Click here to load this message in the networking platform