473,473 Members | 1,730 Online
Bytes | Software Development & Data Engineering Community
Create 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.Timeout property to the ADO
connection object but it doesn't work.
Can anybody tell me how can i set the Connection.Timeout property in
both vb and SQL Server.

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

e.g.
cnn.CommandTimeout = 300

set it after you open a connection.

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

Steve

"MSR" <ms*****@hotmail.com> wrote in message
news:9c**************************@posting.google.c om...
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.Timeout property to the ADO
connection object but it doesn't work.
Can anybody tell me how can i set the Connection.Timeout 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*****@hotmail.com> wrote in message
news:9c**************************@posting.google.c om...
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.Timeout property to the ADO
connection object but it doesn't work.
Can anybody tell me how can i set the Connection.Timeout 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***@centurysystems.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*****@hotmail.com> wrote in message
news:9c**************************@posting.google. 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.Timeout property to the ADO
connection object but it doesn't work.
Can anybody tell me how can i set the Connection.Timeout 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
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. -----------------------------------------------------------...
2
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 ...
5
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...
3
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...
4
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...
0
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...
1
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...
3
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....
1
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...
1
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...
0
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,...
0
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...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
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...
0
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...
0
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,...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.