The information in this article applies to:
SUMMARY
Moderate: Requires basic macro, coding, and interoperability skills.
MORE INFORMATION
The schema changes that this article discusses are limited to any changes
you make to the design of your tables or their relationships. When you make
schema changes in the Design Master database of a replica set, carefully
consider the impact that those changes may have on other replicas in the
set. For example, if you create a one-to-many relationship that enforces
referential integrity between two tables, one of the replica databases may
contain orphan records in the child table that do not have a corresponding
parent record. Or if you change a table validation rule, there may be
records in a replica table that do not comply with the new validation
rules.
Example 1 - Table Validation RulesSuppose you change a table's ValidationRule property for a numeric field in the Design Master database, requiring that the field value must be greater than 50. When you synchronize with a replica that contains a record with the number 48 in that field, synchronization completes successfully but a data error occurs. This is because the table in the Design Master could not be updated with the data from the replica table that does not fit the new validation rule. To resolve this error, you must change the data in the replica so that it complies with the validation rule, and then synchronize again.Example 2 - Creating a RelationshipImagine you have a Customers and an Orders table that have no enforced relationship. In a replica database, someone adds some records to the Orders table for which there are no records in the Customers table. Meanwhile, in the Design Master database, you create an enforced relationship between Customers and Orders. When you synchronize, you receive an error message that synchronization failed because a design change could not be applied. This is because there are orphan child records in the replica database's Orders table that have no matching customer in the Customers table, which means that the relationship between Customers and Orders cannot be applied. You must either create records in the replica's Customers table that correspond with each orphaned record in the Orders table, or you must delete the orphaned Orders records until after you synchronize with the Design Master, and then recreate the orders.NOTE: In Microsoft Access 97, you can remove the relationship from the Design Master, and then synchronize again. This will add the orphaned records to the table in the Design Master, where you will have to resolve the problem of the orphaned Orders records before Microsoft Access will allow you to reapply the enforced relationship between Customers and Orders. Example 3 - Making a Table Unreplicable, Then Replicable AgainThis example illustrates a more serious schema change scenario. Assume you have two tables called Customers and Orders with a one-to-many relationship that enforces referential integrity. In the Design Master database you remove the relationship between the two tables, and you make the Customers table unreplicable. Then you change your mind and you make it replicable again, and recreate the enforced relationship between Customers and Orders. When you synchronize with a replica, the synchronization will fail because the design changes cannot be applied. Here is what happens in the replica database:
REFERENCES
For more information about using replication in Microsoft Access, refer to
the replication white papers. You will find download instructions for the
white papers in the following articles in the Microsoft Knowledge Base:
Keywords : kbusage RplConf Rpldmr |
Last Reviewed: November 10, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |