title: Deadlock in Update Stored Procedure
body: <p>i am working on a data entry panel, there more than 300 clients working at a time with updating data on data table, i am using stored procedure to execute update in data table looks like this..</p>
  
  <pre><code>SET ANSI_NULLS ON
  GO
  SET QUOTED_IDENTIFIER ON
  GO
  -- =============================================
  -- Author:                &lt;Author,,Name&gt;
  -- Create date: &lt;Create Date,,&gt;
  -- Description:        &lt;Description,,&gt;
  -- =============================================
  ALTER PROCEDURE [dbo].[Update_Tbl_Client_Bpo_Data]
  
  @Id int,
  @CId varchar(50),
  @Tbc_No varchar(200),
  @Name varchar(200),
  @EmailId varchar(200),
  @MobileNo varchar(50),
  @Gender varchar(50),
  @LicenseNo varchar(200),
  @GirNo varchar(200),
  @PanNo varchar(200),
  @H_Address varchar(500),
  @H_City varchar(200),
  @H_PinNo varchar(200),
  @H_county varchar(200),
  @H_State varchar(200),
  @O_Address varchar(200),
  @O_City varchar(200),
  @O_PinNo varchar(200),
  @LAL varchar(200),
  @MRNNo varchar(200),
  @AF varchar(200),
  @NRI varchar(200),
  @CP varchar(200),
  @Status varchar(200)
  
  AS
  BEGIN
          -- SET NOCOUNT ON added to prevent extra result sets from
          -- interfering with SELECT statements.
          SET NOCOUNT ON;
  
  
  
          update Tbl_Client_Bpo_Data 
  set
  
  Tbc_No=@Tbc_No,
  Name=@Name,
  EmailId=@EmailId,
  MobileNo=@MobileNo,
  Gender=@Gender,
  LicenseNo=@LicenseNo,
  GirNo=@GirNo,
  PanNo=@PanNo,
  H_Address=@H_Address,
  H_City=@H_City,
  H_PinNo=@H_PinNo,
  H_county=@H_county,
  H_State=@H_State,
  O_Address=@O_Address,
  O_City=@O_City,
  O_PinNo=@O_PinNo,
  LAL=@LAL,
  MRNNo=@MRNNo,
  AF=@AF,
  NRI=@NRI,
  CP=@CP,
  Status=@Status from  Tbl_Client_Bpo_Data  where Id=@Id and CId=@CId 
  END
  </code></pre>
  
  <p>this Stored procedure get Deadlock Error like this...</p>
  
  <pre><code>transaction was deadlocked on lock resources with another process and has been chosen as the deadlock victim. rerun the transaction.
  </code></pre>
  
  <p>i create a backup module to find error logs which displays that this stored procedure get deadlock while more clients also try to update data..
  <a href="https://i.stack.imgur.com/EowjW.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EowjW.jpg" alt="Error Logs"></a></p>
  
  <p>i also added <code>SET TRANSACTION ISOLATION LEVEL READ COMMITTED</code> </p>
  
  <p>but it doesn't work for me..
  can someone give an solution to resolve this situation..</p>
  
  <p>or if there is some kind of mechanism that holds execution process until previous execution completes</p>