Exception: "Distributed transaction completed. Either enlist this session in a new transaction or the NULL transaction"
This is hapening inside a SProc running on a machine having both SQL 2005 and Sql 2008 hosted.
The C# code looks something like this
(using TransactionScope t = new TransactionScope ())
{
using(SqlConnection c= new SqlConnection(...))
{
c.Open();
DataContext1 ctx = new DataContext1(c);//Linq2SQL
c.StoreData(2,3);//Call Sproc
}
}
Sproc Looks like this
Select * Table where x=2 and y=3
if(@@rowcount =0)
Insert into table values(2,3)
end if