Facing problem with commandtimeout
Even after setting the commandtimeout property of connection object to 35 seconds my query goes on executing for more than the specified period.Following is the code i am using
dim objcon, objrs, cmd
set objcon = Server.CreateObject("ADODB.Connection")
set objrs = Server.CreateObject("ADODB.RecordSet")
set cmd = Server.CreateObject("ADODB.Command")
objcon.ConnectionString = "Provider=SQLOLEDB; Data Source=TestDB; Database=test; user id =aspguest;pwd=aspguest"
objcon.Open
cmd.ActiveConnection = objcon
cmd.CommandText = "select * from temp"
cmd.CommandTimeout =40
set objrs = cmd.Execute
Any help would be greatly appreciated
|