Solved

SQL_QUERY_TIMEOUT - how to set ??

Posted on 1998-09-13
5
1,197 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

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
View SQL database for NPS accounting 4 25
Need more granular date groupings 4 45
sql trace 4 29
MAC Dreamweaver connect to external MS SQL Server 2 40
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

752 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