Skip to content

Latest commit

 

History

History
34 lines (23 loc) · 1.77 KB

commandtimeout-property-ado.md

File metadata and controls

34 lines (23 loc) · 1.77 KB
title TOCTitle ms:assetid ms:mtpsurl ms:contentKeyID ms.date mtps_version f1_keywords f1_categories ms.localizationpriority
CommandTimeout property (ADO)
CommandTimeout property (ADO)
a0b6209c-9feb-08ae-002a-15d1d20734a8
48546714
09/18/2015
v=office.15
ado210.chm1231124
Office.Version=v15
medium

CommandTimeout property (ADO)

Applies to: Access 2013, Office 2013

Indicates how long to wait while executing a command before terminating the attempt and generating an error.

Settings and return values

Sets or returns a Long value that indicates, in seconds, how long to wait for a command to execute. Default is 30.

Remarks

Use the CommandTimeout property on a Connection object or Command object to allow the cancellation of an Execute method call, due to delays from network traffic or heavy server use. If the interval set in the CommandTimeout property elapses before the command completes execution, an error occurs and ADO cancels the command. If you set the property to zero, ADO will wait indefinitely until the execution is complete. Make sure the provider and data source to which you are writing code support the CommandTimeout functionality.

The CommandTimeout setting on a Connection object has no effect on the CommandTimeout setting on a Command object on the same Connection; that is, the Command object's CommandTimeout property does not inherit the value of the Connection object's CommandTimeout value.

On a Connection object, the CommandTimeout property remains read/write after the Connection is opened.