ADO CommandTimeout property
Definition and usage
The CommandTimeout property can be set or returned to specify the time to wait before terminating the attempt and generating an error during command execution.
Sets or returns a Long value indicating the number of seconds to wait for the command to execute. The default value is 30.
Syntax
object.CommandTimeout
Example
For Command Object:
<% set conn=Server.CreateObject("ADODB.Connection") conn.Provider="Microsoft.Jet.OLEDB.4.0" conn.Open "c:/webdata/northwind.mdb" set comm=Server.CreateObject("ADODB.Command") comm.CommandTimeout=10 response.write(comm.CommandTimeout) conn.close %>
For Connection Object:
<% set conn=Server.CreateObject("ADODB.Connection") conn.Provider="Microsoft.Jet.OLEDB.4.0" conn.Open "c:/webdata/northwind.mdb" conn.CommandTimeout=10 response.write(conn.CommandTimeout) conn.close %>