HostName Property

Gets or sets the host name used for the device when connecting to the Publisher.

Namespace:  System.Data.SqlServerCe
Assembly:  System.Data.SqlServerCe (in System.Data.SqlServerCe.dll)

Syntax

'Declaration
Public Property HostName As String
    Get
    Set
'Usage
Dim instance As SqlCeReplication
Dim value As String

value = instance.HostName

instance.HostName = value
public string HostName { get; set; }
public:
property String^ HostName {
    String^ get ();
    void set (String^ value);
}
member HostName : string with get, set
function get HostName () : String
function set HostName (value : String)

Property Value

Type: System. . :: . .String
The host name for the device. The default is no host name.

Remarks

The HostName property is optional. Use this property to set a value for HOST_NAME() in a dynamic filter. For example, if you create a dynamic filter on a merge replication article, you can use HOST_NAME() to filter the data that is replicated. For example, if you specify "LName = HOST_NAME()" for the filter, and you set the HostName property to "Jones" before calling Synchronize, only rows that have "Jones" in the LName column will be present in the subscription. For more information, see "Adding a Filter to an Article" in Books Online.

Your application must call the ReinitializeSubscription method if it changes the value of the HostName property after the subscription is created.

See Also

Reference

SqlCeReplication Class

SqlCeReplication Members

System.Data.SqlServerCe Namespace