>

Synchronize Method

Applies To

Database Object.

Description

Synchronizes the current database object with the database in the .mdb file corresponding to pathname. Various types of exchanges can be performed as specified by the exchange argument. If no argument is provided, the exchange is bidirectional (import and export).

Syntax

database.Synchronize pathname [,exchange]

The Synchronize method syntax has the following parts.

Part

Description

database

An existing, replicable Database object variable that you want synchronized.

pathname

Path to the target database with which database will be synchronized. The trailing .mdb can be optionally omitted.

exchange

A constant indicating which direction to synchronize changes between the two databases. This can be one of the following Integer constants:

u dbRepExportChanges — Send changes from current database to pathname.

u dbRepImportChanges — Receive changes from pathname.

u dbRepImpExpChanges — (Default) Bidirectional exchange.


Remarks

This method causes an exchange of data and schema changes between the database and the .mdb identified by pathname. Schema changes are always done first. Both databases must be at the same schema level before data can be exchanged. For example, an exchange of type dbRepExportChanges might cause schema changes to be made at the current replica even though data changes flow only from the current replica to the designated target.

The replica identified in pathname must be part of the same replica set. If both replicas have the same ReplicaID property setting or have design-master status, the synchronization fails.

Note

The Synchronize method can be used only if your application has Microsoft Access with Briefcase Replication installed.