![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I wrap two updates from different tableadapters in a transactionscope. They are connected to the same databese. By runing the program I get an error message: Communication with the underlying transaction manager has failed. Error HRESULT E_FAIL has been returned from a call to a COM component. The code: using (TransactionScope scope = new TransactionScope()) { coworkerTableAdapter.Update(this.userDataSet.Cowor ker[k]); projectTableAdapter.Update(this.userDataSet.Projec t[t]); scope.Complete(); } What can be the reason? If I update only one table it works without problems. |
#3
| |||
| |||
|
|
On Nov 28, 3:53 pm, tim <t... (AT) discussions (DOT) microsoft.com> wrote: I wrap two updates from different tableadapters in a transactionscope. They are connected to the same databese. By runing the program I get an error message: Communication with the underlying transaction manager has failed. Error HRESULT E_FAIL has been returned from a call to a COM component. The code: using (TransactionScope scope = new TransactionScope()) { coworkerTableAdapter.Update(this.userDataSet.Cowor ker[k]); projectTableAdapter.Update(this.userDataSet.Projec t[t]); scope.Complete(); } What can be the reason? If I update only one table it works without problems. Hi tim, Do you have access to the database server ? I mean to say, check whether MSDTC is enabled on database server machine and on your machine too. It is accessible through following path -- Control Panel --> Administrative Tools --> Component Services --> Component Services --> Computers Now right click on My Computer and click on properties. Go to MSDTC tab. Click Security Configuration Now you just check all check boxes leaving the Enable XA Transactions. Leave everything else as it is. I hope that this works for you. I had a similar problem, which was solved by enabling MSDTC on server and my machine. In case of any problems, please revert back. Thanks, coolCoder ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ If you find this post helpful, please rate it. |
#4
| |||
| |||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |