?
Solved

Increase the Timeout in a Query

Posted on 2003-04-01
7
Medium Priority
?
5,600 Views
Last Modified: 2010-11-03
Hi,

I need to execute a query from VBscript to a SQL Server View, but the problem is that the Timeout error is displayed when I execute this query. So I need to increase the timeout to execute the query. I need to know if it is possible to increase this timeout for all queries into the SQL Server or if it is not possible how I can increase this timeout into the vbscript ( I am using a Recordset and so I need to increase the timeout over the Connection object).

Thanks.
0
Comment
Question by:mayojm
[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
  • 2
  • 2
  • 2
7 Comments
 
LVL 9

Accepted Solution

by:
rherguth earned 80 total points
ID: 8248232
Dim oConn
Set oConn = CreateObject("ADODB.Connection")
oConn.CommandTimeout = 120
oConn.Open ""      ' Your connection string

The default timeout is 30 seconds.
0
 

Expert Comment

by:rbolchoz
ID: 8249018
To set the timeout in VBScript in an ASP page use

Server.ScriptTimeout = numSeconds

The default is 90 seconds
0
 

Expert Comment

by:rbolchoz
ID: 8342263
Does this answer your question?
0
Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

 
LVL 17

Expert Comment

by:walterecook
ID: 10365260
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Accept: rbolchoz {http:#8249018}

Please leave any comments here within the next four days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

walterecook
EE Cleanup Volunteer
0
 
LVL 9

Expert Comment

by:rherguth
ID: 10369523
walterecook,
Thanks for all your cleanup activities.

>> I need to increase the timeout over the Connection object

Please split the points since I answered the question and rbolchoz answered what was probably the next issue mayojm would have had with ASP's timeout after lengthening the ADODB connection timeout.

I know, It's only 10 points, but hey!

Thanks
0
 
LVL 17

Expert Comment

by:walterecook
ID: 10371692
I missed your 'set it  it to 120' line
Sorry about that.

MOD
change the recommdation to
accept rherguth
0

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

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

This post contains step-by-step instructions for setting up alerting in Percona Monitoring and Management (PMM) using Grafana.
Lotus Notes has been used since a very long time as an e-mail client and is very popular because of it's unmatched security. In this article we are going to learn about  RRV Bucket corruption and understand various methods to Fix "RRV Bucket Corrupt…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

777 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