Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ADO problems with VFP tables
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00229306
Message ID:
00230331
Views:
17
The issue you are dealing with stems from the fact that your recordset does not have a key that uniquely identifies a record. I published a tip about this 2 or 3 years ago in FoxTalk. If you create a local view/remote view in which the field specified as the key is not unique, changes made to 1 record with that key will propogate to all records with that key value.

This issue has nothing to do with bookmarks. In fact, if your cursortype is set to static (3), bookmarks are in fact supported.

The solution, make sure you both have a primary key in your tables, and for the table you wish to update, make sure that key is included in your ADO Recordset.


>John Hi,
>
>Here is another problem with ADO using VFP DBF's.
>
>I execute an Rs.Open "SELECT " statement and get a record set.
>
>I then update most fields only one record from that recordest and perform an Rs.Update.
>
>If the record set happens to contain more than one record that are exactly the same (for example all fields are blank), then all the records are updated and thereby I get duplicates in the table even though my intention was to change only one record.
>
>I believe that this may have something to do with the fact that the OLE-DB provider (in this case MS VFP) does not support bookmarks (or record numbers in this case).
>
>Am I correct in this assesment and is there a workaround?
>
>Thanks
>
>Costas
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform