ACC95: How Replication Affects AutoNumber Fields

Last reviewed: May 13, 1997
Article ID: Q138443
The information in this article applies to:
  • Microsoft Access version 7.0

SUMMARY

Advanced: Requires expert coding, interoperability, and multiuser skills.

When you convert a nonreplicable database to a replicated database, the AutoNumber fields in your tables change from incremental to random.

MORE INFORMATION

All existing AutoNumber fields in existing records retain their values, but new values for inserted records are random numbers. Random AutoNumber fields are not meaningful because they are not in any particular order and the record inserted last does not necessarily have the highest value.

When you open a table with a random AutoNumber key, the records appear in the order of ascending random numbers, not in chronological order. With random AutoNumber fields it is possible, although highly unlikely, for records inserted at different replicas to be assigned the same value. If this happens, updates could be made in the wrong records. If you experience such problems, consider using the s_Guid field as the primary key. Because all numbers in the s_Guid field are unique, each record has a different ID.

Before you convert your nonreplicable database into a replicated database, determine if any of your applications or users rely on the order and incremental nature of the AutoNumber field. If so, you can use an additional Date/Time field to provide sequential ordering information.

REFERENCES

For more information about AutoNumber fields, search on the phrase "random numbering," and then view "Create a Field that Automatically Generates Numbers" using the Answer Wizard from the Microsoft Access for Windows 95 Help menu.

For more technical information about replication, please see the following article here in the Microsoft Knowledge Base:

    ARTICLE-ID: Q138828
    TITLE:      ACC95: Microsoft Jet Replication White Paper Available on
                MSL
 

	
	


Keywords : GnlOthr kbusage
Version : 7.0
Platform : WINDOWS
Hardware : X86
Issue type : kbinfo


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.

Last reviewed: May 13, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.