title: Microsoft.ACE.OLEDB.12.0 Current Recordset does not support updating error received when trying to update access
body: <p>I have a ASP page where a user will upload a excel file. After the file is successfully uploaded I want to take the rows in the REGION tab and insert them into an MS Access 2007 table. Below is the code I used and I am getting this error. Can I use the recordset update with the Microsoft.ACE.OLEB.12.0 provider? Is there a better way to do this?
  ADODB.Recordset error '800a0cb3' </p>
  
  <p>Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype. </p>
  
  <pre><code>Set cnnExcel = Server.CreateObject("ADODB.Connection")
  cnnExcel.Open "Provider=Microsoft.ACE.OLEDB.12.0;" &amp; _
                  "Data Source=" &amp; strExcelFile &amp; ";" &amp; _
                      "Extended Properties=" &amp;  Chr(34) &amp; "Excel 12.0 Xml;HDR=Yes;IMEX=1" &amp; Chr(34) &amp; ";" 
  Response.Write "Excel connection opened&lt;BR&gt;"
  
  ' Load ADO Recordset with Excel Data
  Set rstExcel = Server.CreateObject("ADODB.Recordset")
  rstExcel.Open "Select * from [REGION$]", cnnExcel, adOpenStatic 
  Response.Write "Excel Recordset loaded&lt;BR&gt;"
  
  ' Open Access Connection
  Set cnnAccess = Server.CreateObject("ADODB.Connection")
  cnnAccess.Open "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" &amp; strAccessFile &amp; ";Persist Security Info=False;" 
  Response.Write "Access connection opened&lt;BR&gt;"
  Const adOpenStatic = 1
  Const adLockOptimistic = 3
  Const adCmdText = &amp;H0001
  ' Load ADO Recordset with Access Data
  Set rstAccess = Server.CreateObject("ADODB.Recordset")
  rstAccess.Open "REGION", cnnAccess, adOpenStatic, adLockOptimistic, adCmdTable
  Response.Write "Access Recordset loaded&lt;BR&gt;"
  
  ' Synchronize Recordsets and Batch Update
  Do Until rstExcel.EOF
  
          ' .AddNew
          For each field in rstExcel.Fields
              If field.Name = "% Over/Under" Then
                  rstAccess.AddNew field.Name,0
              Else
                  rstAccess.AddNew field.Name,field.Value
              End If
          Next
  
      rstExcel.MoveNext
  Loop
  rstAccess.UpdateBatch
  </code></pre>