Microsoft Jet and Replication Objects

SetObjectReplicability Method

See Also        Applies To

Sets whether an object is local or replicated.

Syntax

Replica.SetObjectReplicability(ObjectName, ObjectType, Replicability)

Parameters

ObjectName   A String value specifying the name of the object for which to retrieve the replication state.

ObjectType   A String value specifying the type of object specified by ObjectName.

Replicability   A Boolean value specifying whether the object is or will be replicated.

Remarks

The SetObjectReplicability method makes an object local or replicated. If the database has not been made replicable, setting the Replicability parameter to False will indicate that the object should be kept local when the database is made replicable. Objects in non-replicable databases are replicable by default. However, new objects created in a replicable database are not replicable by default. To make a new object in a replicable database replicable, set the Replicability parameter to True.

The ObjectName and ObjectType parameters are strings that indicate the name of the object (for example, Customers) and the object's container (for example, Tables). An error will occur if an object of that name and type does not exist in the database. An error will also occur if either of these strings is longer than 64 characters.

SetObjectReplicability is ignored on objects in the following Microsoft Access collections: Forms, Reports, DataAccessPages, Macros, and Modules. An Access system table, MSysAccessObjects, controls the replicability of these objects and can only be set prior to making the database replicable. The default is True.

See the GetObjectReplicability method for information about how to determine an object's replicability.