ilyad,
I believe you were involved in the original problem thread. Nevertheless, here's a statement of the problem.
I have a .DBF file (free table) created by Clipper. Each record in the table consists of 87 fields. One of the fields (GS_ID) is unique (not allowed to be duplicated). Using either the ODBC Visual FoxPro Driver or the VFPOLEDB Driver in a Visual Basic application I can access the data, place it in an ADO Recordset (rs1) and populate VB forms with it. The Connection Strings for both drivers are shown in a previous post in this thread.
I process the results of user actions in a string array [PA(0 to 86) As String]. Then, with the following VB code segment I try to update the Recordset:
For i = 0 to 86
If rs1.Fields(i) <> PA(i) Then
rs1.Fields(i) = PA(i)
End If
Next i
rs1.Update
I get the following errors on the rs1.Update statement:
Visual FoxPro Driver: Statement Too Long
VFPOLEDB: Multi-Step operation
I understand that these two errors are equivalent, i.e. caused by the same condition. Apparently, the length of the Update statement generated by the driver from rs1.Update is longer than allowed. A VFP Trace revealed that the WHERE clause of the generated Update statement contains all 87 fields.
Responders to this thread have been suggesting various ways to resolve the situation. Because a Primary Index cannot be placed on free tables it was suggested that a Candidate Index be created with the effect that the WHERE clause would contain only the GS_ID field. Apparently, after many false starts, this index has supposedly been created with your latest approach. However, I continue to get the same error on thhe rs1.Update statement.
Another suggestion was to abandon ADO (the rs1.Update statement) and do a direct conn1.Execute "UPDATE ...... statement. I did that with code explained in a previous post but got a "Missing Operand" error.
--------------------
By the way, how can I verify that the index you say was created was, in fact, created?