473,505 Members | 14,618 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

vb - sql server 2000 timeout

jamesd0142
469 Contributor
im using this connection string:

Expand|Select|Wrap|Line Numbers
  1. Con = New OleDb.OleDbConnection("Provider=sqloledb;Data Source=Datadiss3;Initial Catalog= " & Database & ";" & "User ID=username;Password=password; connect timeout=0")
  2.  
and i get error connection timed out.

Why is the connect timeout=0 not working?

Or can any one suggest anything?

Thanks

James
Mar 7 '08 #1
2 1107
dip_developer
648 Recognized Expert Contributor
im using this connection string:

Expand|Select|Wrap|Line Numbers
  1. Con = New OleDb.OleDbConnection("Provider=sqloledb;Data Source=Datadiss3;Initial Catalog= " & Database & ";" & "User ID=username;Password=password; connect timeout=0")
  2.  
and i get error connection timed out.

Why is the connect timeout=0 not working?

Or can any one suggest anything?

Thanks

James
hi james,
if you wish to use Connection Timeout in your string then keep in mind the following.....
You have to set Timeout settings at three level. and these all will work together.

First:
In SQL Server enterprise manager, in database property set query time out to 0, It's default vaule is 600.

Second:
In your connection string add "Connection Timeout = 0"

Third:
When you executing your stored procedure or query, that time you also need to set SqlCommand's CommandTimeout to 0.
Ex. : cmdExecute.CommandTimeout = 0;
and keep in mind Connection timeout is---->
The length of time (in seconds) to wait for a connection to the server before terminating the attempt and generating an error.its default value is 15.
A value of 0 indicates no limit, and should be avoided in a ConnectionString, because an attempt to connect will wait indefinitely.
Mar 7 '08 #2
jamesd0142
469 Contributor
Thanks for the reply.

I was advised to create an index in my database to speed up the query. This worked wonders and i no longer get the timed out error.

James
Mar 10 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
12569
by: Greg | last post by:
Hi all, I am doing some large updates, that may update 10,000 plus rows. This works fine when I execute the SQL directly in Query Analyzer. If I set the timeout on my VB connection to 0...
10
6340
by: HB Kim | last post by:
Hello, What could possibly cause data in the SQL server database to be removed, except being deleted manually? We had a couple of situations where data in certain records disappeared although the...
3
8291
by: Hasan | last post by:
Hi I'm having a problem with deadlocks in a table in SQL server when trying to update it through Biztalk 2004. There is no problem when I use the same Biztalk solution to update a similar dummy...
2
393
by: Dave | last post by:
I have developed a VB.net application that transfers a SOAP wrapped message to another server securely(using SSL and sever/client certificates). When I run this app from a Windows 2000...
9
1630
by: John | last post by:
I have a single server running SQL Server 2000 sp3a, and acting as a ASP.NET webserver (.net 1.1 sp1). W2k sp4. Dual Xeon processor, 2 gigs RAM. Everything works fine, but sometimes when I...
9
4414
by: Jim | last post by:
Group, I have a Web application sitting on a staging server that is using SQL Server 2000 as its data store, and I can run the application flawlessly. Now, when I copy the project to my...
8
5755
by: BBC1009 | last post by:
I have an application connected to an overseas sql-server using port 1433. But recently it always timeout the connection. Any solution to avoid this??? I am using the VB.net Windowed Form with...
1
45149
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
16321
by: Brad | last post by:
I have been trying to do a query(view) in Enterprise Manger and Query Analyzer with a timeout result everytime. In EM in happens in about 30 seconds and in QA it happens in about 45 seconds. I...
20
3421
by: Wes Groleau | last post by:
I was doing update statements in SQL Server 2000. I have a table with over 16 million rows. It came from several hundred delimited text files, and two of the columns are file ID (int) and Line...
0
7216
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
7098
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...
1
7018
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...
1
5028
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4699
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3176
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1528
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 ...
1
754
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
407
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.