Solved

SQL_QUERY_TIMEOUT - how to set ??

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

Free Webinar: AWS Backup & DR

Join our upcoming webinar with experts from AWS, CloudBerry Lab, and the Town of Edgartown IT to discuss best practices for simplifying online backup management and cutting costs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL 2014 missing dll from Bin? 3 31
Need help with a query 14 36
Need SSIS project 2 24
SQL Server Express or Standard? 5 24
Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

763 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