Hangs with LINQ-SQL Server and TransactionScope
Posted
by Zian Choy
on Stack Overflow
See other posts from Stack Overflow
or by Zian Choy
Published on 2010-03-17T01:44:09Z
Indexed on
2010/03/17
1:51 UTC
Read the original article
Hit count: 545
I'm encountering a hang when the program tries to access the fruit database. I've already enabled network access MSDTC on both my development computer and the SQL Server server.
Code: (pardon the code coloring...SO's misinterpreting my VB .NET)
Using ts As New TransactionScope
Dim fruit As New FruitDataContext
Dim thingies As New ThingiesDataContext
If (From f In fruit.tblApples Where f.Rotten = True).Count >= 1 Then
'Record today's date as the day that the rotten apples were dumped.
End If
'Other complicated code that uses ThingiesDataContext and FruitDataContext
du.SubmitChanges()
ts.Complete()
End Using
© Stack Overflow or respective owner