HostName Property (Replication ActiveX)

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 (Transact-SQL) function.

Syntax

object.HostName [= value]
Part Description

object

Expression that evaluates to a SQLMerge object.

value

Value to be returned by HOST_NAME (Transact-SQL) in filter clauses.

Applies To

SQLMerge Object

Remarks

Use the HostName property to set a value for HOST_NAME (Transact-SQL) in dynamic filtering. For example, if the subset filter clause LoginID = HOST_NAME() has been specified for an article, and if you set the HostName property to "adventure-works\garrett1" before calling the Run Method (Replication ActiveX) method of the SQLMerge Object (Replication ActiveX) object, only rows having "adventure-works\garrett1" in the LoginID column will participate in the replication of that article.

The case of the HostName property is only ignored when both the Publisher and the publication database are configured as case insensitive.

Data Type

String

Modifiable

Read/write

Prototype C/C++

HRESULT get_HostName(BSTR *pVal);
HRESULT put_HostName(BSTR newVal);