DynamicFilterHostName Property

Replication Programming

Replication Programming

DynamicFilterHostName Property

The DynamicFilterHostName property returns or sets the host name used when creating a dynamic snapshot. This property provides a value used when the publication is dynamically filtered using the HOST_NAME( ) function.

Applies To

SQLSnapshot Object

Syntax

object.DynamicFilterHostName [= value]

Part Description
object Expression that evaluates to a SQLSnapshot object.
value Value to be returned by HOST_NAME( ) in filter clauses when creating a dynamic snapshot.
Remarks

Use the DynamicFilterHostName property to set a value for HOST_NAME( ) in filtering when a dynamic snapshot is created. For example, if the subset filter clause "rep_id = HOST_NAME( )" has been specified for an article, and if you set the DynamicFilterHostName property to "FBJones" before calling the Run method of the SQLSnapshot object, only rows having "FBJones" in the rep_id column will be included in the snapshot.

The DynamicFilterHostName property applies only to snapshots created for merge publications.

By default, HOST_NAME() evaluates to the name of the computer on which the merge control is executing, unless it is overridden by setting the DynamicFilterHostName property.

Data Type

String

Modifiable

Read/write

Prototype C/C++

HRESULT get_DynamicFilterHostName(BSTR *pVal);

HRESULT put_DynamicFilterHostName(BSTR newVal);

See Also

HOST_NAME