Quantcast
Channel: ADO.NET, Entity Framework, LINQ to SQL, NHibernate
Viewing all articles
Browse latest Browse all 1698

submitChnages throw zombiecheck

$
0
0

hi everyone,

I have a code similar to this, which performs a commit of a single row to a database table (SQL 2008)

using(var db = new MyDbDataContext(_dbConnectionString)){
    Action action = new Action();
    db.Actions.InsertOnSubmit(dbAction);
    db.SubmitChanges();}

Normally everything is fine, but once in a while I get the following exception:

System.InvalidOperationException: This SqlTransaction has completed; it is no longer usable.
at System.Data.SqlClient.SqlTransaction.ZombieCheck()
at System.Data.SqlClient.SqlTransaction.Rollback()
at System.Data.Linq.DataContext.SubmitChanges(ConflictMode failureMode)

There are a number of similar questions on SO but I after reading them I cannot work out the cause.

Could this be simply due to a SQL timeout (the exception occurs close to 30s after the call is made)?


Viewing all articles
Browse latest Browse all 1698

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>