Solved

SQL_QUERY_TIMEOUT - how to set ??

Posted on 1998-09-13
5
1,214 Views
Last Modified: 2008-02-26
Hello all!
How can i set up this param ?

    SQL_QUERY_TIMEOUT

i read about it, in the IIS4 Option pack Help Files.
(<local webserver>/iishelp/iis/htm/asp/iiidcfld.htm)

It refers to idc /htx files, which are the old redundant asp files.
It says that this "number of seconds to wait for a SQL statement to execute before canceling the query"

Obviously, the ODBC driver is timing out, and I need to reset the default timeout number for the ODBC driver.
This is the closest thing I have come up with for an answer.

So my problem is now this - how to set this Param in the new asp format?
or how to set it in ANY SQL Query.

or where could i find more information about it?

Thanks for all helpful answers :-)

Jussy
0
Comment
Question by:webcast
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 

Author Comment

by:webcast
ID: 1090024
Edited text of question
0
 

Author Comment

by:webcast
ID: 1090025
Adjusted points to 100
0
 
LVL 1

Accepted Solution

by:
mikkon earned 100 total points
ID: 1090026
The SQL_QUERY_TIMEOUT parameter is obviously IDC/HTX specific, so you can't use it in ASP. However, there are other ways of setting a query timeout.

Set Connection.CommandTimeout to a timeout value in seconds (default is 30). Then use that Connection when operating on recordsets. If you are using Command object instead, you must set its CommandTimeout property.

For more help on the Connection.CommandTimeout property, see .../iishelp/ado/docs/adopro02_2.htm.

0
 

Author Comment

by:webcast
ID: 1090027
Thank you so much, kind sir!

   I've been plagued by this for ... God knows how long!

My mistake - i was using ConnDB.ConnectionTimeout = <time value>
instead of ConnDB.CommandTimeout = <time value>

Last night, i did do this though, and it worked ....


Const      DB_CONNECT_STR = "Data Source=WebCast;User ID=sa;Password=;SQL_QUERY_TIMEOUT=1000"

But it did work once, and once it didn't work .... weird...

anyways, i just had a quick go with your suggesstion, and it was
fine :-)

Obviously, CommandTimeout is for Connection objects, while
ConnectionTimeout is for recordsets - like you noted sorta ?

Above, you said connection.COMMANDTIMEOUT (for record sets) and
command.COMMANDTIMEOUT (for command obj) .. what is the difference? Shout record sets should have been Connection.CONNECTIONTIMEOUT ?

the first part is just the name of the object created ....

Anyways, so if this is long winded and confussed - just thank you for the answer, which was (like always) looking me in the face :-)
0
 
LVL 1

Expert Comment

by:mikkon
ID: 1090028
Connnection.CommandTimeout sets the timeout of a command (for example, an SQL query), but Connection.ConnectionTimeout sets the timeout for the initial connection (username/password handshaking, which takes place BEFORE any SQL queries are executed).

0

Featured Post

 Watch the Recording: Learning MySQL 5.7

MySQL 5.7 has a lot of new features. If you've dabbled with an older version of MySQL, it is definitely worth learning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question