title: update sql query stops updating excel spreadsheet
body: <p>I have a classic ASP web application that updates a table in a Excel spreadsheet.</p>
  
  <p>I am using the following to connect to the Excel file</p>
  
  <pre><code>Set rows = CreateObject("ADODB.Recordset")
  objConnection.Open "Provider=Microsoft.ACE.OLEDB.12.0;" &amp; _
  "Data Source=" &amp; Server.MapPath("data.xlsx") &amp; ";" &amp; _
  "Extended Properties=" &amp;  Chr(34) &amp; "Excel 12.0 Xml;HDR=Yes" &amp; Chr(34) &amp; ";" 
  </code></pre>
  
  <p>That is a sample query that I am executing</p>
  
  <pre><code>query = "UPDATE [Sheet1$] SET [STATUS] = 'unclaimed', [CLAIMER] = '' ,[SDATE] = '" 
  &amp; DATE &amp; "' WHERE [JUR] = '" &amp; in_jur &amp; "' AND [WC] = " &amp; in_wc 
  objConnection.Execute query,numRows,adExecuteNoRecords
  </code></pre>
  
  <p>The above query gets executed in the process.asp page when the user clicks on a button that calls a javascript function that sends the value of in_jur and in_wc like this</p>
  
  <pre><code>function sendForProcessing() {
      somejur = //use the document.getElementByID to get selected jur
      somewc = //use the document.getElementByID to get selected wc
      window.location = process.asp?in_jur=somejur&amp;in_wc=somewc
  }
  </code></pre>
  
  <p>The application updates the sheet correctly for some time (i counted the number of times it works. 1st test: 10 times 2nd test: 16 times it just varies) and then it stops working.
  I do not get error message in the objConnection.Execute.</p>
  
  <p>When i print out the numRows it prints 1. </p>
  
  <p>Is there a better way to update the row in Excel?</p>