A simple example demonstrates how you can code synchronizations between replicas in a star and hub topology. It's assumed that you already have code that writes the path to any new replica created in a table called Replicas, and you define which replica is the hub.
The table Replicas has two fields:
ReplicaPath. A string pathname to each replica in the replica set.
Hub. A Boolean: “Yes” if it's the hub; otherwise, “No.”
The code simply creates a recordset from the Replicas table, and then loops through the records. If the current record doesn't point to the hub, synchronize by using ReplicaPath.
The code in Listing 23.5 is behind a button named cmdSyncAllReplicas on the Synchronize Star & Hub Topology form.
Caution
You may have already noticed that the MSysReplicas table already contains the path to each replica in the replica set. It's tempting to use these values rather than create your own, but that would be unwise. Microsoft provides no guarantee that system tables will maintain their format between releases. If your code relies on values in MSysReplicas, your code might not work in future releases of Access. Also, with the new replica visibilities, you might not be synchronizing your entire replica set.
3.144.8.212