Microsoft KB Archive/177062

= PRB: Update Conflict When Key Field Is Not Unique in Remote View =

Article ID: 177062

Article Last Modified on 5/12/2003

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0 Standard Edition
 * Microsoft Visual FoxPro 3.0b Standard Edition
 * Microsoft Visual FoxPro 5.0 Standard Edition
 * Microsoft Visual FoxPro 5.0a
 * Microsoft Visual FoxPro 6.0 Professional Edition

-



This article was previously published under Q177062



SYMPTOMS
The error "Update Conflict" appears when deleting, editing, or inserting records in a remote view if the key field chosen in the Update Criteria tab is not a unique field.



CAUSE
If FoxPro finds duplicate keys in the local buffer of the table, it generates this error. FoxPro uses the key field to uniquely identify the correct record to delete or edit. If FoxPro did not identify the record, it could delete or edit the wrong records.



RESOLUTION
Here are two workarounds for this problem:


 * Design the tables with a unique key field and mark the field as the key field in the Update Criteria tab of the view designer.

-or-
 * If creating a unique key field is impossible, select multiple fields to be the keys in the Update Criteria tab. If these fields combine to make a unique key, update conflicts will not occur because FoxPro can uniquely identify the record.



STATUS
This behavior is by design.

