The CommandTimeout property functions properly for all values other than 0.
If you wish an infinite timeout, you will need to use this parameter in
conjunction with the Command object instead. The following example
demonstrates how to set the Command object's timeout:
Set MyConn = Server.CreateObject("ADODB.Connection")
MyConn.ConnectionTimeout = 0
MyConn.CommandTimeout = 0 ' *** THIS HAS
*** NO EFFECT BECAUSE OF THE BUG ***
MyConn.Open ConStr, UserId, PassWord
Set cmdTemp = Server.CreateObject("ADODB.Command")
' *** T H I S L I N E W A S A D D E D ***
cmdTemp.CommandTimeout = 0 ' *** SETTING IT TO ZERO CAUSES IT TO WAIT
FOREVER ***
NOTE: The CommandTimeout property on an ADO connection object has no effect on the CommandTimeout property setting of the command object on the same connection. Essentially, the command object's CommandTimeout property does not inherit the value of the connection object's CommandTimeout value.
In order for cmdTemp.CommandTimeout = 0 to work properly, you must use the command object to execute the query.