title: This SqlTransaction has completed; it is no longer usable, why?
body: <p>Code:</p>
  
  <p>I am trying to run this function but it throws error:
  <strong>This SqlTransaction has completed; it is no longer usable.</strong></p>
  
  <p>I have used every other way but not working. I have used it without <code>USING</code> but still same error.</p>
  
  <p>Why?</p>
  
  <pre><code>public Boolean AddWorkProgress(int WorkID, int ContractorID, float PhysicalProgress, 
    decimal FinancialProgress, int UserID, int OrgID, float FinancialProgressPecentage)
  {
     SqlCommand SqlCom = new SqlCommand("AddWorkProgress", DataBaseConnection.OpenConnection());
     SqlCom.CommandType = CommandType.StoredProcedure;
  
     using (SqlTransaction sqlTrans = SqlCom.Connection.BeginTransaction()) 
     {
        SqlCom.Transaction = sqlTrans;
  
        try
        {
           SqlCom.Parameters.AddWithValue("@Work_ID", WorkID);
           SqlCom.Parameters.AddWithValue("@Contractor_ID", ContractorID);
           SqlCom.Parameters.AddWithValue("@PhysicalProgress", PhysicalProgress);
           SqlCom.Parameters.AddWithValue("@FinancialProgress", FinancialProgress);
           SqlCom.Parameters.AddWithValue("@OrgID", OrgID);
           SqlCom.Parameters.AddWithValue("@fk_WebUsers_UserID", UserID);
           SqlCom.Parameters.AddWithValue("@FinancialProgressPercentage", FinancialProgressPecentage);
           SqlParameter SqlParamReturnStatus = new SqlParameter("@ReturnStatus", SqlDbType.Bit);
           SqlCom.Parameters.Add(SqlParamReturnStatus);
           SqlParamReturnStatus.Direction = ParameterDirection.Output;
           SqlParameter SqlParamReturnStatusMessage = new SqlParameter("@ReturnStatusMessage", SqlDbType.VarChar, -1);
           SqlCom.Parameters.Add(SqlParamReturnStatusMessage);
           SqlParamReturnStatusMessage.Direction = ParameterDirection.Output;
           SqlCom.ExecuteNonQuery();
           DataBaseConnection.CloseConnection();
  
           string ReturnStatusMessage = Convert.ToString(SqlParamReturnStatusMessage);
           Boolean ReturnStatus = Convert.ToBoolean(SqlParamReturnStatus.Value);
           // ProgressID = Convert.ToInt64(SqlParamReturnProgressID.Value);
  
           sqlTrans.Commit();
           return ReturnStatus;
        }
  
        catch (Exception ex)
        {
           sqlTrans.Rollback();
           sqlTrans.Dispose();
  
           throw ex;
        }
     }
  }
  </code></pre>