NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

ADOConnection.ConnectionTimeout

Gets or sets the time to wait while establishing a connection before terminating the attempt and generating an error.

[Visual Basic]
Public Property ConnectionTimeout As Integer
[C#]
public int ConnectionTimeout {get; set;}
[C++]
public: __property int get_ConnectionTimeout();
public: __property void set_ConnectionTimeout(int);
[JScript]
public function get ConnectionTimeout() : int;
public function set ConnectionTimeout(int);

Property Value

The time (in seconds) to wait for a connection to open. The default value is 15 seconds.

Exceptions

Exception Type Condition
InvalidConnectionTimeout The value set is less than 0.
OpenConnectionPropertySet The connection is Open. Close the connection.

Remarks

A value of 0 indicates no limit (i.e. the connection will wait indefinitely). The ConnectionTimeout property overwrites the cooresponding property within the connection string.

Note   This property is read-only while the connection is open.

Example

The following example shows how to create a connection and set many of its properties.

See Also

ADOConnection Class | ADOConnection Members | System.Data.ADO Namespace | ConnectionString | Database | IsolationLevel | DataSource | UserID | Password