ADO » Connection » ConnectionTimeout

string = connectionobject.ConnectionTimeout
connectionobject.ConnectionTimeout = string

Sets the number of seconds to wait while attempting to create a connection before terminating the attempt and generating an error message.

The ConnectionTimeout property sets or returns how many seconds to wait before cancelling a connection attempt and generating an error. The default is fifteen seconds. However, heavy server use or high network traffic can easily cause delays greater than fifteen seconds. If you set ConnectionTimeout equal to zero seconds, the program will wait indefinitely or until the connection is completed.
This property must be set before the connection is established.


Dim objConnection
Set objConnection = Server.CreateObject("ADODB.Connection")
objConnection.ConnectionString =
      "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=GuruList"
objConnection.ConnectionTimeout = 0

See Also: