Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Tips on parent-child bizobj to share db transaction
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01235772
Message ID:
01238003
Vues:
9
Kevin,

I hope you had a great 4th.

The failures that were occuring were validation failures, not exceptions.

I tried the hotfix, but it doesn't seem to have fixed my problem.

I would like to implement this using the first way I described; by saving the parent object and having the child objects automatically save.

If I use this.Save(oObj1, dsObj1, oObj1.TableName) will the child objects' datasets also bind back with the page's controls? If not how should I make sure that the child datasets contain the data from the controls before calling Save with the parent object?

This seems like it would be common situation; a form for making new database entries that also handles form validation. Could you provide an example or psuedo code on how I might go about doing this? Assuming the business objects are configured properly (and i believe they are now because the parent primary key is being passed down to the child objects).

Thank You

>Govinda,
>
>>I believe the documentation states that if you register a business object as a child of another business object, they automatically participate in the transaction of the parent. But when I tried this, I found that saves within the transaction were getting committed even when there was a failed save in Obj2 or Obj3.
>
>What kind of failures occured in Obj2 and Obj3? Were they exceptions?
>
>>Then I tried to explicitly start and commit (or rollback) a transaction on Obj1, with the understanding that the child objects would use the parent transaction. This works when there are no validation problems. When there are validation problems and I attempt to save the second time after fixing the validation issue, I get the following: "ExecuteReader requires the command to have a transaction when the connection assigned to the command is in a pending local transaction. The Transaction property of the command has not been initialized."
>
>We have uploaded a few hot fixes for transactions recently that may address this. I'll e-mail you directly with details.
>
>Best Regards,
Govinda Berrio
GKG Inc.
Providence, RI
http://www.gkginc.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform