title: ASP error "Key column information is insufficient or incorrect." when updating mySQL
body: <p>I have the following subroutine in a classic ASP class that calls the ADO UPDATE method. I'm using mySQL db using ODBC driver 5.1.</p>
  
  <p>If I all the subroutine I get the following error:</p>
  
  <p><em>Microsoft Cursor Engine error '80004005'
  Key column information is insufficient or incorrect. Too many rows were affected by update.</em></p>
  
  <pre><code>Public Sub Update(table,id_field,id,fields,values)
      Dim yy
      Dim strQuery
      Dim strFields
      Const adOpenDynamic = 2
      Const adLockOptimistic = 3
      Const adCmdText = 1
      strQuery = ""
      For yy = LBound(fields) to UBound(fields)
              strQuery = strQuery &amp; fields(yy) &amp; ", "
      Next
      strQuery = Left(strQuery, Len(strQuery) - 2)
      strQuery = "select " &amp; strQuery &amp; " from " &amp; table &amp; " where " &amp; id_field &amp; "=" &amp; id
      i_objRS.CursorLocation = 3
      i_objRS.Open strQuery, i_objDataConn, adOpenDynamic, adLockOptimistic, adCmdText
      For yy = 0 To UBound(fields)
              i_objRS(fields(yy)) = values(yy)
      Next
      i_objRS.Update
      i_objRS.Close
  End Sub
  </code></pre>
  
  <p>I've tried changing the cursorlocation property and the open parameters but still cannot get it to work. The table I'm updating has a unique auto id which is the primary key.</p>