KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

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

Article: Q177062
Product(s): Microsoft FoxPro
Version(s): WINDOWS:3.0,3.0b,5.0,5.0a,6.0
Operating System(s): 
Keyword(s): kbvfp kbvfp300 kbvfp300b kbvfp500 kbvfp500a kbvfp600
Last Modified: 18-AUG-1999

-------------------------------------------------------------------------------
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 
Technology        : kbVFPsearch kbAudDeveloper kbVFP300 kbVFP300b kbVFP500 kbVFP600 kbVFP500a
Version           : WINDOWS:3.0,3.0b,5.0,5.0a,6.0
Issue type        : kbprb

=============================================================================

THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Copyright Microsoft Corporation 1986-2002.