ACC95: How Replication Affects AutoNumber Fields

ID: Q138443


The information in this article applies to:


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:

Q138828 ACC95: Microsoft Jet Replication White Paper Available on MSL


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

Last Reviewed: April 23, 1999