Name

Connection.ConnectionTimeout Property — (Versions 2.0, 2.1, 2.5, 2.6)

Synopsis

                     connection.ConnectionTimeout = timeout
                  

The ConnectionTimeout property indicates how long in seconds ADO will wait while attempting a connection to a data source.

Datatype

Long

Description

By using the ConnectionTimeout property, you can specify how long ADO will wait for a connection to a data source. The setting for the ConnectionTimeout property is represented in seconds. By setting this property to zero, you are allowing ADO to wait indefinitely for a specified connection. If the connection does time out, an error is generated.

The ConnectionTimeout property is read- and write-enabled while the Connection object is closed, but read-only once it is opened.

Note

Not all providers support the ConnectionTimeout property.

See Also

Connection.Open Method

Get ADO: ActiveX Data Objects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.