HostName Property

Replication Programming

Replication Programming

HostName Property

The HostName property returns or sets the host name used when connecting to the Publisher. This property provides a value used when the publication is dynamically filtered using the SQL Server HOST_NAME( ) function.

Applies To

SQLMerge Object

Syntax

object.HostName [= value]

Part Description
object Expression that evaluates to a SQLMerge object.
value Value to be returned by HOST_NAME( ) in filter clauses.
Remarks

Use the HostName property to set a value for HOST_NAME( ) in dynamic filtering. For example, if the subset filter clause "rep_id = HOST_NAME( )" has been specified for an article, and if you set the HostName property to "FBJones" before calling the Run method of the SQLMerge object, only rows having "FBJones" in the rep_id column will participate in the replication of that article.

Data Type

String

Modifiable

Read/write

Prototype C/C++

HRESULT get_HostName(BSTR *pVal);

HRESULT put_HostName(BSTR newVal);

See Also

HOST_NAME