ADODB query timeout
from http://codingjourney.blogspot.com/2008/11/ado-connection-timeout-command-or.html
The Solution
You must also set the
commandTimeout
property on theADODB.Command
orADODB.Recordset
being used. Otherwise those objects will use the default time limit of 30 seconds because they do not inherit the time limit from the associatedADODB.Connection
instance.Example Using VBScript in ASP 3:
set con = createObject("ADODB.Connection")con.open connectionStringcon.commandTimeout = 60set command = createObject("ADODB.Command")command.activeConnection = concommand.commandType = adCmdTextcommand.commandText = sqlcommand.commandTimeout = 60command.executeresponse.write command.commandTimeout 'This is now 60 seconds.