473,385 Members | 1,907 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

command time out error

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?

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"

For some reason, I get Timeout error in exactly 30 seonds. Any help would
appreciated.
Jul 19 '05 #1
2 10718
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"
Jul 19 '05 #2
Thanks bob, it worked. I did as you are doing it and now it recognizes the
comdtimeout.
You are a effort saver....
Tahir Khan

"Bob Barrows" <re******@NOyahoo.SPAMcom> wrote in message
news:OH**************@TK2MSFTNGP11.phx.gbl...
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"

Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Michael | last post by:
I have an application that will export two files to fixed width text to combine as a single text file. The first export will be a query containing header information for the file, the second query...
2
by: dailem | last post by:
I have a bit of code tied to a command button in Access that runs a query then transfers it to a new Excel worksheet (& new file). It works fine EVERY OTHER TIME THAT I RUN IT....what the 'heck...
0
by: SheldonMopes | last post by:
I have a command button on a form that changes the filter and order conditions on a subform (the subform is based on a query). Sometimes, if I click the button again immediately after clicking on...
2
by: Greg Strong | last post by:
I'm experimenting with using Access 2k2 as a front end to Oracle Express. I am creating 10 tables using pass through DDL queries. The PROBLEM is the general format of the VB code WORKS on the 1st...
0
by: Newcomer | last post by:
Hi everybody, For sure an easy thing for you to solve. But for me as non expert I cannot find the mistake. I wrote an easy find command as shown here Range("A:A").Select
10
richardhodge
by: richardhodge | last post by:
I am a VB6 database programmer and have run into a small problem. The company I work for primarily uses Microsoft Access 2000 for the database that is the back end for our software. Well the...
25
by: dennijr | last post by:
ok, shell always used to be easy for me, now its starting to get annoying cause i dont know wats wrong heres the simplist code possible: Private Sub IExplorer_Click() a = Shell("C:\Program...
3
by: Frisco Depot | last post by:
I have a Run-time error problem on a Vista computer. There are two computers involved, The first one is Vista Home Premium SP1 with Windows Mail Version 6.0.6000.16386 (vista_rtm.061101-2205)...
0
by: Juliom | last post by:
Run-time error'-2147467259(80004005)' Could not use 'C:\TestDB\Netfront\Netfront.accdb';file already in use I have to enter a password to open my DB. once the DB is open, and I click on a form...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.