title: Excel ADO "The access database engine stopped the process because you and another user are attempting to change the same data at the same time"
body: <p>I retrieve data from SQL Server and store it on a sheet in Excel and then I run an ADO UPDATE query within Excel to update data on a different sheet.</p>
  
  <p>I have not come across this error during developing yet users are reporting they see this error frequently:</p>
  
  <p><a href="https://i.stack.imgur.com/Fvpny.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Fvpny.png" alt=""></a></p>
  
  <p>Note that the file is located on a network drive, but even after copying the file to a different location, it is still producing said error.</p>
  
  <p>Code:</p>
  
  <pre><code>Dim rs  As New ADODB.Recordset
  Dim cmd As New ADODB.Command
  Dim cnn As New ADODB.Connection
  
  Application.ScreenUpdating = False
  Application.EnableEvents = False
  
  cnn.Open "Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" &amp; ThisWorkbook.FullName &amp; "';" &amp; _
           "Extended Properties=""Excel 12.0;HDR=YES;"";"
  
  Set rs = GetOverview
  shUpdateSLSheet.UsedRange.clear
  WriteHeadersToSheet rs, shUpdateSLSheet.Name, 1
  shUpdateSLSheet.Range("A2").CopyFromRecordset rs
  
  If (rs.EOF And rs.BOF) Then GoTo NoData
  
  cmd.ActiveConnection = cnn
  cmd.CommandType = adCmdText
  
  cmd.CommandText = "UPDATE [SL$] INNER JOIN [UpdateSLSheet$] " &amp; _
                      "ON ([SL$].ID = [UpdateSLSheet$].ID) " &amp; _
                          "SET [SL$].[CS_A] = [UpdateSLSheet$].[CS_A]" &amp; _
                          ", [SL$].[CS_B] = [UpdateSLSheet$].[CS_B]" &amp; _
                          ", [SL$].[CS_C] = [UpdateSLSheet$].[CS_C]" &amp; _
                          ", [SL$].[CS_D] = [UpdateSLSheet$].[CS_D]" &amp; _
                          ", [SL$].[CS_E] = [UpdateSLSheet$].[CS_E]" &amp; _
                          ", [SL$].[CS_F] = [UpdateSLSheet$].[CS_F]" &amp; _
                          ", [SL$].[Solved By SR] = [UpdateSLSheet$].[SolvedBySR]" &amp; _
                          ", [SL$].[Comments] = [UpdateSLSheet$].[Comments]"
  
  cmd.Execute
  
  Application.EnableEvents = True
  Application.ScreenUpdating = True
  
  Set cmd = Nothing
  Set rs = Nothing
  Set cnn = Nothing
  </code></pre>
  
  <p>As soon as cmd.Execute gets executed the error comes up.</p>
  
  <p>EDIT: I have no clue why this is happening. I'm going for an iterative approach instead of using ADO in this case.</p>