ADO CommandTimeout Property

Home | About me | EXCEL VB Programming (XL97-2003) | ACCESS Programming | EXCEL VB.Net Programming | EXCEL Spreadsheet Functions Material Management  |  Guestbook
 

ADO CommandTimeout Property

The CommandTimeout property sets or returns the number of seconds to wait while attempting to execute a command, before canceling the attempt and generate an error.

Default is 30.

Syntax

object.CommandTimeout

Example

For a Connection object:
Dim conn As ADODB.Connection
set conn = New ADODB.Connection

conn.Provider = "Microsoft.Jet.OLEDB.4.0"
conn.Open "F:\MaterialMaster\Material_Master.mdb"
conn.CommandTimeout=10
debug.print (conn.CommandTimeout)
conn.close
Set conn = Nothing