HostName Property (Replication)
The HostName property sets the host name used for the device when connecting to the Publisher. HostName is used when the publication is dynamically filtered using the SQL Server HOST_NAME() function. HostName is optional.
Syntax
object.HostName [= value]
Parameters
- value
The host name of the client. The default is no host name.
Applies To
SQL Server Compact 3.5 Replication object
Data Type
String
Modifiable
Read/write
Prototype
HRESULT get_HostName(BSTR *pVal);
HRESULT put_ HostName (BSTR newVal);
Remarks
Use HostName to set a value for the HOST_NAME() function in a dynamic filter. For example, if the subset filter clause is specified for an article as "LName = HOST_NAME( )"
, and you set HostName to "Jones" before calling the Run method, only rows having "Jones" in the LName column are present in the subscription after synchronization is complete. For more information, see "Dynamic Filters" in SQL Server Books Online.
An application must call the ReinitializeSubscription method if the value of HostName changes after the subscription is created.
See Also
Reference
ReInitializeSubscription Method (Replication)
Replication Object Properties