Tuesday, January 1, 2008

VBScript "Microsoft OLE DB Provider for SQL Server: Timeout expired" problem

Can be solved by setting:

Set cmd = CreateObject("ADODB.Command")
cmd.CommandTimeout = 300

300 is 5 mins, in seconds

1 comment:

நவாப் said...

Thanks. it was helpful and working fine. I used the following:

objConn.CommandTimeout = 120
objConn.Open connStr

With objCmd
.ActiveConnection = objConn
.CommandType = 4
.CommandText = "<>"
.CommandTimeout = 300
.Execute
End With