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

ID: Q177062


The information in this article applies to:
  • Microsoft Visual FoxPro for Windows, versions 3.0, 3.0b, 5.0, 5.0a, 6.0


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.


REFERENCES

User's Guide Online, Chapter 5: Updating Data with Views

Technical Papers Online: Client Server Development

(c) Microsoft Corporation 1997, All Rights Reserved. Contributions by David Botzenhart, Microsoft Corporation

Additional query words: remote view update delete

Keywords : kbVFp kbVFp300 kbVFp300b kbVFp500 kbVFp500a kbVFp600 FxprgClientsvr
Version : WINDOWS:3.0,3.0b,5.0,5.0a,6.0
Platform : WINDOWS
Issue type : kbprb


Last Reviewed: August 17, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.