Windows Develop Bookmark and Share   
 index > Windows Forms Data Controls and Databinding > Typed dataset and transaction question
 

Typed dataset and transaction question

I have a WinForms application that interacts with a SqlCe local database. I manage db operations using BindingSources, TableAdapters and typed datasets.I have several operations scattered through several methods in two different classes that I need to perform in a transaction and I was thinking of using System.Transactions.Transaction or CommitableTransaction. My question is, do Transaction or CommittableTransaction work in such situations? For example, would this code work successfully in a transaction and rollback in an error or do I have to also use transaction in OtherClass methods too?:

OtherClassothercls=newOtherClass();
...
privatevoidDoAll()
{
/*begintransactionhere*/
this.tableAdapter.DoSomeDBWork();
othercls.DeleteSomeRecords();//usestableadapter+sqlcodetodelete.throwsexceptiononerror.doesn'thavetransaction
othercls.DeletOtherRecords();//usestableAdapter.Rows.Find(id).Delete().throwsexceptiononerror.doesn'thavetransaction
othercls.Update();//usestableadapter.Update().throwsexceptiononerror.doesn'thavetransaction
this.DeleteSomeFiles();//throwsexceptiononfail
/*endtransactionhere*/
}

armagane  Tuesday, February 24, 2009 4:13 PM

Hi armagane,

SqlCE 3.5 introduced support for the System.Transactions features, but it does not support integration with a distributed transaction. The previous version of SqlCE doesn't support that feature.

Please look at this.
http://documentation.genom-e.com/Genome/Default.aspx/GenomeDoc/99.TechTalk.Genome.RefGuide.chm%5Caref_Support.SqlCE.html

If you need any further help, please feel free to tell me.

Sincerely,
Kira Qian


Please mark the replies as answers if they help and unmark if they don't.
Kira Qian  Thursday, February 26, 2009 3:39 AM

Hi armagane,

SqlCE 3.5 introduced support for the System.Transactions features, but it does not support integration with a distributed transaction. The previous version of SqlCE doesn't support that feature.

Please look at this.
http://documentation.genom-e.com/Genome/Default.aspx/GenomeDoc/99.TechTalk.Genome.RefGuide.chm%5Caref_Support.SqlCE.html

If you need any further help, please feel free to tell me.

Sincerely,
Kira Qian


Please mark the replies as answers if they help and unmark if they don't.
Kira Qian  Thursday, February 26, 2009 3:39 AM

You can use google to search for other answers

Custom Search

More Threads

• Detect 'Dirty' State of TableAdapter
• DataGridViewComboBox column - can I disable the items in list requirement?
• Custom control with DataSource property
• should I use DataGrid? advice needed
• Listview - SQL deleting
• Stuck while updating Master/Detail Datagrid column
• Datagridview problems (join and combobox)
• admin and user combobox problem
• show grid line in datagridview control
• Database Error