September 2, 2008 at 2:39 am
Hi
I get below error when the application tries deleting some data from sql server.
What can cause it and how to fix it?
Error:
This SqlTransaction has completed; it is no longer usable.
-----------------------------------------------------------
at System.Data.SqlClient.SqlTransaction.Rollback()
at GETOtis.DatabaseWrapper.SqlHelper.RollbackTransaction()
at GETOtis.BusinessObject.clsDeleteBuilding_Rule.DeleteBuilding(clsDeleteBuilding_Data objRequest)
at GETOtis.UI.SR_TreeView.DeleteBuilding()
-----------------------------------------------------------
September 2, 2008 at 7:50 am
I am assuming you are getting this error from a .NET application. It looks like, based on the error, your application has a logic error so that it is trying to Rollback the transaction AFTER it has committed it. It's like the application has something like this pseudocode:
If Not Error Then
Commit Transaction
End If
RollBack Transaction
When you should have:
If Not Error Then
Commit Transaction
Else
RollBack Transaction
End If
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply