Sets or returns a value on a CdbTableDef object within a partial replica that indicates which subset of records is replicated to that table from a full replica. (Microsoft Jet databases only.)
Syntax
VOIDSetReplicaFilter(LPVARIANT pv );
COleVariantGetReplicaFilter(VOID);
Parameters
Type | Argument | Description |
LPVARIANT | pv | A pointer to a variant whose value is a string or Boolean that indicates which subset of records is replicated as described in Remarks. |
Remarks
This property indicates which subset of records is replicated, as specified in the following table:
Value | Description |
A string | A criteria that a record in the partial replica table must satisfy in order to be replicated from the full replica. |
True | Replicates all records. |
False | (Default) Doesn't replicate any records. |
If you use a string, it is similar to an SQL WHERE clause (without the word WHERE), but you cannot specify subqueries, aggregate functions (such as Count), or user-defined functions within the criteria.
You can only synchronize data between a full replica and a partial replica. You can't synchronize data between two partial replicas. Also, with partial replication you can set restrictions on which records are replicated, but you can't indicate which fields are replicated.
Usually, you reset a replica filter when you want to replicate a different set of records. For example, when a sales representative temporarily takes over another sales representative's region, the database application can temporarily replicate data for both regions and then return to the previous filter. In this scenario, the application resets the ReplicaFilter property and then repopulates the partial replica.
If your application changes replica filters, you should follow these steps:
To remove a filter, set the ReplicaFilter property to False. If you remove all filters and invoke the PopulatePartial method, no records will appear in any replicated tables in the partial replica.
Note If a replica filter has changed, and the Synchronize method is invoked without first invoking PopulatePartial, a trappable error occurs.