Solved

ACCESS (adp) XP/2003 - SQL 2005 Express Backend + .NET (SQL DEAD LOCK)

Posted on 2009-05-14
3
597 Views
Last Modified: 2013-12-05
I have inherited this app -
Access adp file runs on the network, calling machines run either Access XP or 2003.
Form is bound to a table in sql 2005 express.
I have added a stored procedure to the database to insert a new row in the table.
The error I get from the .net app is as follows...
=====================================================================================
                Error in calling assembly Avon Master Pleat Pack, Version=1.0.0.1, Culture=neutral, PublicKeyToken=null.
      Occured in .Net SqlClient Data Provider.
      ________________________________________________________________________
      Transaction (Process ID 70) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
      
      Description: An unhandled exception occurred during execution.
      
      The exception was thrown due to the SQL Server returning a warning or error.
      Please review the stack trace for more information about the error and where it originated in the code.
      
      Exception Details: System.Data.SqlClient.SqlException: Transaction (Process ID 70) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
      
      Source Error:
       .Net SqlClient Data Provider
      
      Stack Trace:
         at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
         at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
         at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
         at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
         at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
         at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
         at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
         at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
         at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
         at DAL.MeasurementHeadersHelper.SaveOLDMeasurementHeader(String BarcodeBegin, String BarcodeEnd) in C:\Projects\Custom Filter\Source Code\CustomFilterRespiratorDatabase.DAL\MeasurementHeadersHelper.cs:line 133
         at Avon_Master_Pleat_Pack.Form1.buttonAccept_Click(Object sender, EventArgs e) in C:\Projects\Custom Filter\Source Code\Avon Master Pleat Pack\Avon Master Pleat Pack\Form1.cs:line 273
      
      Additional SQL Server Information:
      ________________________________________________________________________
       Server Name:      CF-FS1\SQLEXPRESS
       Error Type:      50000
       Error Level:      13
       Error Code:      52
       Procedure Name:      InsertNewMeasurementHeader
       Line Number:      131
=====================================================================================

WHen making the stored procedur call to the database in the .net application, the acces application is not (to my knowledge) connected to the table performing the insert on.
0
Comment
Question by:William
3 Comments
 
LVL 39

Expert Comment

by:BrandonGalderisi
ID: 24391989
So what's the question?

A deadlock is when two (or more) processes are blocked waiting on the other to release resources.  Since each one cannot proceed until it receives the the information being locked by the other, they are deadlocked.
0
 
LVL 42

Accepted Solution

by:
EugeneZ earned 500 total points
ID: 24392011
run sql profiller  to get info who-is-what in your deadlock chain
Deadlock Detection using Profiler in SQL Server              2005
http://www.extremeexperts.com/SQL/Yukon/DeadLockDetection.aspx


more
Detecting and Ending Deadlocks

http://msdn.microsoft.com/en-us/library/ms178104(SQL.90).aspx
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

805 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question