Server Error in '/' Application.

ERROR [40001] [Microsoft][ODBC SQL Server Driver][SQL Server]Transaction (Process ID 111) was deadlocked on lock | communication buffer resources with another process and has been chosen as the deadlock victim. Rerun the transaction.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.Odbc.OdbcException: ERROR [40001] [Microsoft][ODBC SQL Server Driver][SQL Server]Transaction (Process ID 111) was deadlocked on lock | communication buffer resources with another process and has been chosen as the deadlock victim. Rerun the transaction.

Source Error:


Line 289:
Line 290:                    OdbcCommand Comp = new OdbcCommand("update Articles set Visit='" + visit + "' where Article_ID='" + PostId + "'", con);
Line 291:                    Comp.ExecuteNonQuery();
Line 292:                }
Line 293:                con.Close();

Source File: e:\Inetpub\vhosts\cityliveindia.com\httpdocs\City\Deoghar\Article.aspx.cs    Line: 291

Stack Trace:


[OdbcException (0x80131937): ERROR [40001] [Microsoft][ODBC SQL Server Driver][SQL Server]Transaction (Process ID 111) was deadlocked on lock | communication buffer resources with another process and has been chosen as the deadlock victim. Rerun the transaction.]
   System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode) +1111142
   System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader, Object[] methodArguments, SQL_API odbcApiMethod) +1059
   System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader) +68
   System.Data.Odbc.OdbcCommand.ExecuteNonQuery() +90
   City_Deoghar_Article.Page_Load(Object sender, EventArgs e) in e:\Inetpub\vhosts\cityliveindia.com\httpdocs\City\Deoghar\Article.aspx.cs:291
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +52
   System.Web.UI.Control.OnLoad(EventArgs e) +97
   System.Web.UI.Control.LoadRecursive() +61
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +693


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4700.0