Transaction Scope with datatable updates
I have a VB windows app using a dataset with multiple datatables and a datagridview for the UI. Okay. I have the datatable. updates and inserts and deletes working.
Now, I just want to wrap the calls to the different table updates/inserts/deletes in a single transaction so I can manage the errors and roll it all back.
Is TransactionScope an option for me?
Using .net 2.0, VB 2005, ... I tried to add the System.transaction but it doesn't seem to know it. "Imports System.Transactions" ... does not load or find it. Is this just a stupid syntax or basic know-how that I'm missing ?
I see SQLClient.SQLTransaction and I found an article that says I need to create a new transaction, ... it used OleDbTransaction = cn.BeginTransaction and set the .Transaction property of each DataAdapter's Command (UpdateCommand, InsertCommand, DeleteCommand). ... I have 3 adapters, with 3 commands that 9 statements. And it isn't clear if this goes with the DataAdapter definition/setup or when I'm ready to do the updates.
I'm confused and have spent hours just trying to find the syntax to make the transaction happen in .net 2, VB and the dataset/Datatable commands.
Can someone point me to the straight answer?
I've really need to get it done and go on to something else. Thanks.

