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 based on the Microsoft® SQL Server™ HOST_NAME( ) function. HostName is optional.
SQL Server CE Replication object
object.HostName [= value]
|object||SQL Server CE Replication object|
|value||Host name. The default is no host name.|
HRESULT get_HostName(BSTR *pVal); HRESULT put_ HostName (BSTR newVal);
Use HostName to set a value for HOST_NAME( ) 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. For more information, see "Dynamic Filters" in SQL Server Books Online.
An application must call the ReinitializeSubscription method if it changes the value of HostName after the subscription is created.