Tahir Khan wrote:
I am running into a command time out error. I have to retrieve a lot
of date thru a complex query. For some reason, I can't change the
commandtimeout to more then 30 secs. And yes I have Connectiontime
incr4eased to 90 seconds. No luck. Is there some thing about ADO
version that could help?
ConnectionTimeout is totally irrelevant. Please read the ADO documentation
at msdn.microsoft.com/library (it's under the Data Access node in the table
of contents)
Here is the string that I use to make the connection.
server.scripttimeout = 80
set srs = Server.CreateObject("ADODB.RecordSet")
sAscTracCons ="Provider=SQLOLEDB;Data Source=Indy2;Initial
Catalog=Asctrac;User Id=xx;Password=xxx;CommandTimeout=90"
I've never tried to set the commandTimeout in the connection string. I've
always set it after opening the connection:
Set cn = Server.CreateObject("ADODB.Connection")
cn.Open sAscTracCons
cn.CommandTimeout = 90
This has never failed for me. Are you sure you are getting an ADO timeout
vs. a script timeout? You should use the Server object to set the
scriptTimeout ...
Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"