473,842 Members | 1,838 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

TimeOut Expired

MSR
Hi,
I have a query that takes 1 min 50 secs to execute in Query analyser
(SQL Server 2000).
When i execute this query from vb using ADO i get the 'Timeout
Expired' error.
I have tried setting the Connection.Time out property to the ADO
connection object but it doesn't work.
Can anybody tell me how can i set the Connection.Time out property in
both vb and SQL Server.

Thanks in advance
Jul 20 '05 #1
3 83248
Use the CommandTimeout property

e.g.
cnn.CommandTime out = 300

set it after you open a connection.

Also any command objects you create will not inherit this property so add
objADOCmd.Comma ndTimeout = 300 on each command object

Steve

"MSR" <ms*****@hotmai l.com> wrote in message
news:9c******** *************** ***@posting.goo gle.com...
Hi,
I have a query that takes 1 min 50 secs to execute in Query analyser
(SQL Server 2000).
When i execute this query from vb using ADO i get the 'Timeout
Expired' error.
I have tried setting the Connection.Time out property to the ADO
connection object but it doesn't work.
Can anybody tell me how can i set the Connection.Time out property in
both vb and SQL Server.

Thanks in advance

Jul 20 '05 #2
My two cents.

We are have had the same problem many times in SQL Server2000.

In our case setting the timeout property made absolutely no difference.
We found two things that caused this error.

1. Flakey or slow network connection.
2. Rebuild and Reindex all indexes on large/heavily used tables.

For us it has always been one of these two things.

"MSR" <ms*****@hotmai l.com> wrote in message
news:9c******** *************** ***@posting.goo gle.com...
Hi,
I have a query that takes 1 min 50 secs to execute in Query analyser
(SQL Server 2000).
When i execute this query from vb using ADO i get the 'Timeout
Expired' error.
I have tried setting the Connection.Time out property to the ADO
connection object but it doesn't work.
Can anybody tell me how can i set the Connection.Time out property in
both vb and SQL Server.

Thanks in advance

Jul 20 '05 #3
The Timeout property of the Connection object is not the problem, that
only controls how long you get to make the connection. Check the
Timeout property of the Command object. Watch out, there are two of
these, the CommandTimeout property of the Connection object, and the
CommanTimeout property of the Command object. The second one is the
one to check.

On Tue, 9 Sep 2003 13:31:51 -0400, "Dave Pylatuk"
<da***@centurys ystems.net> wrote:
My two cents.

We are have had the same problem many times in SQL Server2000.

In our case setting the timeout property made absolutely no difference.
We found two things that caused this error.

1. Flakey or slow network connection.
2. Rebuild and Reindex all indexes on large/heavily used tables.

For us it has always been one of these two things.

"MSR" <ms*****@hotmai l.com> wrote in message
news:9c******* *************** ****@posting.go ogle.com...
Hi,
I have a query that takes 1 min 50 secs to execute in Query analyser
(SQL Server 2000).
When i execute this query from vb using ADO i get the 'Timeout
Expired' error.
I have tried setting the Connection.Time out property to the ADO
connection object but it doesn't work.
Can anybody tell me how can i set the Connection.Time out property in
both vb and SQL Server.

Thanks in advance


Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1811
by: Silvia | last post by:
I have a application web and when execute this for a long time generated this error: Server Error in '/RAIMServer' Application. ----------------------------------------------------------- --------------------- Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and
2
4597
by: Chris Langston | last post by:
I have a Web Server running IIS 5 or 6 on Windows 2K and Windows 2003 Server that is experiencing strange shutdown problems. We are using ASP.NET v1.1 and our application is written in VB.NET Here's the scenario: 1. .NET Windows Client on a remote machine makes a web service call to update tables on a Web Server running SQL Server 2000. 2. The Update is updating about 1000 - 3000 records doing simple update statements like "Update...
5
2103
by: mapexvenus | last post by:
I have a .NET application that uses SQL server. After some useage I get the following error: "Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached" I looked at the SQL server process info and found process ID's for the procedures that the application called - they all had the status as 'sleeping'. The...
3
14002
by: Nils Magnus Englund | last post by:
Hi, I've made a HttpModule which deals with user authentication. On the first request in a users session, it fetches data from a SQL Server using the following code: using (SqlConnection connection = new SqlConnection(ConfigurationSettings.AppSettings)) {
4
13203
by: VB Programmer | last post by:
When I run my ASP.NET 2.0 web app on my dev machine it works perfect. When I precomile it to my web deployment project and then copy the debug files to my web server I get this problem when trying to login (obviously it's using ASPNETDB.mdf). Any ideas? Server Error in '/' Application. --------------------------------------------------------------------------------
0
2040
by: bonita | last post by:
If I add the code for user to download the file (e.g. if(File.Exists(FILE_NAME)){......}), the ASP.NET will give the following timeout error: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. It seems that the download file code is executing before letting the previous code to finish. Even the message print code (message.Text="...";) is not executed.
1
45190
by: Ron | last post by:
Hi, I had a stored procedure on SQL 2000 server to run calculation with large amount of data. When I called this stored procedure via System.Data.SqlClient.SqlCommand on production, i got error as: (i tried to run the stored procedure on query analyzer, and it works well) Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. Description: An unhandled exception occurred...
3
2240
by: rn5a | last post by:
I am working on Win2K Pro (SP4) with P4 2.80GHz, 256MB RAM & 20GB hard disk (IIS5.0). I use Visual Web Developer 2005 Express Edition to create & edit ASP.NET apps. Whenever I log in to my m/c. & run any ASPX page in IE6.0 for the very first time, I always get the following timeout expired error: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
1
11060
by: Jake K | last post by:
I have a system timer that elapses every 10 seconds and must execute every ten seconds. Basically every 10 seconds I need to insert into a table. The following code, however, causes a "Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached." error at cn.open() after about 2 minutes of executing. private...
1
5176
by: Scorpion657 | last post by:
Hey I really need help. I have a Website coded using ASP.NET and VB and for some reason, i'm getting the following error when I try to upload or access a large file which is stored in the database. It was working fine when I was runing the site on the localhost. I added the following line to the web.config file to increase the timeout: <httpRuntime maxRequestLength="1048576" executionTimeout="3600"/> I also added: connection timeout =...
0
9867
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9709
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10939
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10669
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10308
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9449
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5695
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4498
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4086
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.