Hello. Thanks for visiting.

Have questions about Server Intellect?

I'm here to help.

Call us toll free at 1-855-850-HOST(4678)

Server Intellect
(855) 850-HOST

Toll Free 24/7/365        (4678)

Everything is going to be okay. We can solve your issues.

Intellect Connect

Technical problem with your Windows Hosting?

Let our Microsoft Certified experts handle the problem for you.
Chat Now

How do I Increase the Timeout Value in SQL?

There are two places where you can specify Timeout settings in SQL. One being during the actual initialization of the connection string, called “ConnectionTimeout“. This will effect any query made under this database connection string. The other option would be to specify it during the actual query command, called “CommandTimeout“.

conn.ConnectionTimeout

Where conn is an ADODB.Connection object that is not yet open, the connectionTimeout property will indicate the amount of time, in seconds, to wait for an ASP application to initially connect to the data source. The default is 15 seconds; to override the default, use syntax as follows:

<%
Set conn = CreateObject("ADODB.Connection")
conn.<strong>ConnectionTimeout</strong> = 120
conn.Open <connectionString>
%>

CommandTimeout tells the server how long to wait, in seconds, for completion of any command sent to the data source. This value is editable before and after the connection has been opened. The default is 30 seconds, but you can override it like this:

<%
Set conn = CreateObject("ADODB.Connection")
conn.Open <connectionString>
conn.<strong>CommandTimeout</strong> = 120
%>

Note that you can also apply a commandTimeout value to a command object, and it will behave independent of the commandTimeout value associated with the connection object. So for specific stored procedures or other commands being executed explicitly through the ADODB.Command object, you could have a longer timeout than that of the connection object. The syntax for the command object is almost identical:

<%
Set cmd = CreateObject("ADODB.Command")
cmd.<strong>CommandTimeout</strong> = 120
%>
Let Us Fix it For You

Solution Includes

  • Painless Support App
  • Remote Server Management
  • Fast Issue Resolution

Our Certified Technicians have been supporting Microsoft® products for well over a decade.

Fill out the form below to get started

Get Started

Tired of Googling for Answers?

Our Microsoft® Certified Technicians can fix your problem for you.
Give us a try.

Learn More

Can't Find Your Solution?

Our Certified Technicians have been supporting Microsoft® products for well over a decade.

Get Started

Interested in letting our experts solve your IT problems for you?
Get a free, no-obligations consultation with one of our experts today!

Call us at (855) 850-HOST

Chat Now

Start Your Order

X

This form does not accept free e-mail accounts. Please enter a business e-mail to submit it.

Submit Form Cancel

Please wait...

Submitting your info. This may take less than a minute.