ConnectTimeout Property

Gets or sets the amount of time, in milliseconds, that the SqlCeReplication object waits for a connection to the server.

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

Syntax

'Declaration
Public Property ConnectTimeout As Integer
    Get
    Set
'Usage
Dim instance As SqlCeReplication
Dim value As Integer

value = instance.ConnectTimeout

instance.ConnectTimeout = value
public int ConnectTimeout { get; set; }
public:
property int ConnectTimeout {
    int get ();
    void set (int value);
}
member ConnectTimeout : int with get, set
function get ConnectTimeout () : int
function set ConnectTimeout (value : int)

Property Value

Type: System. . :: . .Int32
An [T:System:Int32] value that represents the time-out, in milliseconds, with no default.

Remarks

If a response takes longer than the value specified in [P:System.Data.SqlServerCe.SqlCeReplication.ConnectTimeout,] the request is canceled.

The maximum time-out allowed is 360 seconds. For recommendations on setting this time-out value, see "Optimizing Connectivity" in the  Books Online.

When you try to connect to a server that has multiple IP addresses (multi-homed), the time-out is counted as cumulative for all the IP addresses on the server. For example, if a server has two IP addresses, spending 500ms on the first IP and 500ms on the second IP equals a time-out value of 1000ms for the server.

See Also

Reference

SqlCeReplication Class

SqlCeReplication Members

System.Data.SqlServerCe Namespace