Synchronize Method


Synchronizes two replicas. (Microsoft Jet databases only).


database.Synchronize pathname, exchange

The Synchronize method syntax has the following parts.




An object variable that represents a Database object that is a replica.


A String that contains the path to the target replica with which database will be synchronized. The .mdb file name extension is optional.


Optional. A constant indicating which direction to synchronize changes between the two databases, as specified in Settings.



You can use the following constants in the exchange argument. You can use one of the first three constants with or without the fourth constant.




Sends changes from database to pathname.


Sends changes from pathname to database.


(Default) Sends changes from database to pathname, and vice-versa, also known as bidirectional exchange.


Exchanges data between files connected by an Internet pathway.



You use Synchronize to exchange data and design changes between two databases. Design changes always happen first. Both databases must be at the same design level before they can exchange data. For example, an exchange of type dbRepExportChanges might cause design changes at a replica even though data changes flow only from the database to pathname.

The replica identified in pathname must be part of the same replica set. If both replicas have the same ReplicaID property setting or are Design Masters for two different replica sets, the synchronization fails.

When you synchronize two replicas over the Internet, you must use the dbRepSyncInternet constant. In this case, you specify a Uniform Resource Locator (URL) address for the pathname argument instead of specifying a local area network path.

Note You can't synchronize partial replicas with other partial replicas. See the PopulatePartial method for more information.

Synchronization over the Internet requires the Replication Manager, which is only available in the Microsoft Office 97, Developer Edition.