Hi
How can I use transaction with typed dataset? Let’s say I’ve a record table and record detail table and I’ve to save one in the record table and all the details in the record detail table.
How can I use ? I found transaction can be used with untyped dataset but I don’t see it with typed dataset. Can someone tell me how I should do?
Kevin
There’s a nice article (and code) at CodeProject on how to extend the typed dataset to enable transactions without having them get promoted to a distributed transaction when using the TransactionScope.
Summary: Use the transaction scope with a method added on the partial class to modify the underlying SqlCommand objects to take part in the same transaction.
Code example for adapter from reference: