473,545 Members | 1,884 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ConnectionTimeo ut

BVM
Hi:

Do you know how to change Connection timeout time? By default it's 15s, Now I want to change it to 30s. However SqlConnection.C onnectionTimeou t is read only. What should I do?

Also if the SQL query is to long and need several minutes to finish, is there a way to make timeout time longer?

Thanks,

Dennis Huang

Nov 15 '05 #1
3 8157
Dennis, you can change the Connection Timeout property in your Connection
string. Just set tthe value to whatever you want it to be. That will then
change the ConnectionTimeo ut property on your SqlConnection object.

--
Greg Ewing [MVP]
http://www.citidc.com

"BVM" <De*****@TBH.co m.au> wrote in message
news:O$******** ******@TK2MSFTN GP10.phx.gbl...
Hi:

Do you know how to change Connection timeout time? By default it's 15s, Now
I want to change it to 30s. However SqlConnection.C onnectionTimeou t is read
only. What should I do?

Also if the SQL query is to long and need several minutes to finish, is
there a way to make timeout time longer?

Thanks,

Dennis Huang
Nov 15 '05 #2
Hi,

In your case, you should consider setting the CommandTimeout property of the command object instead. ConnectionTimeo ut is a timeout value for establishing a connection, not executing commands.
BTW, to you can set the connection timeout as a part of the connection string.
For eg: "Database=north wind;server=myS erver;Connect Timeout=30;Inte grated Security=SSPI"

--
HTH,
Manoj G [.NET MVP]
http://www15.brinkster.com/manoj4dotnet

"BVM" <De*****@TBH.co m.au> wrote in message news:O$******** ******@TK2MSFTN GP10.phx.gbl...
Hi:

Do you know how to change Connection timeout time? By default it's 15s, Now I want to change it to 30s. However SqlConnection.C onnectionTimeou t is read only. What should I do?

Also if the SQL query is to long and need several minutes to finish, is there a way to make timeout time longer?

Thanks,

Dennis Huang
Nov 15 '05 #3
And don't set it to zero (ie unlimited). Unfortunately, it currently really means ZERO.

HTH,

--
Greg Low (MVP)
MSDE Manager SQL Tools
www.whitebearconsulting.com

"Manoj G [MVP]" <ma**********@h otmail.com> wrote in message news:uq******** ******@TK2MSFTN GP10.phx.gbl...
Hi,

In your case, you should consider setting the CommandTimeout property of the command object instead. ConnectionTimeo ut is a timeout value for establishing a connection, not executing commands.
BTW, to you can set the connection timeout as a part of the connection string.
For eg: "Database=north wind;server=myS erver;Connect Timeout=30;Inte grated Security=SSPI"

--
HTH,
Manoj G [.NET MVP]
http://www15.brinkster.com/manoj4dotnet

"BVM" <De*****@TBH.co m.au> wrote in message news:O$******** ******@TK2MSFTN GP10.phx.gbl...
Hi:

Do you know how to change Connection timeout time? By default it's 15s, Now I want to change it to 30s. However SqlConnection.C onnectionTimeou t is read only. What should I do?

Also if the SQL query is to long and need several minutes to finish, is there a way to make timeout time longer?

Thanks,

Dennis Huang
Nov 15 '05 #4

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

Similar topics

7
3806
by: John Peter | last post by:
How can i set the Query Processing Time in my asp page. i am getting this error messages "Estimated query processing time 152 exceeds limit 30" John
4
4635
by: Tahir aman | last post by:
I am using ADO to connect to SQL 7.0. At times the connection timeout expires. Is there any way to inrease the default time out? I think currently its 60 secs. Here is the code that I use to establish ADO connection. set rs = Server.CreateObject("ADODB.RecordSet") sCon = "DRIVER={SQL
11
7567
by: David Berry | last post by:
Hi All. I have a SQL Statement on an ASP page that only returns 4 records. When I run it in SQL Server or Query Analyzer it runs in less than a second. When I run it from my ASP page I get: Microsoft OLE DB Provider for SQL Server error '80040e31' Timeout expired the error line points to the rs.Open sql,con line. The SQL Statement...
1
4136
by: Tim Meagher | last post by:
I am running ASP code that was migrated from a Windows 2000 Server to a Windows 2003 server. For some reason the connection timeout or command timeout are getting ignored and my query time sout after 30 seconds. My connection times are set as follows in an include file: Dim objDBConnection Set objDBConnection =...
3
2289
by: BVM | last post by:
Hi: Do you know how to change Connection timeout time? By default it's 15s, Now I want to change it to 30s. However SqlConnection.ConnectionTimeout is read only. What should I do? Also if the SQL query is to long and need several minutes to finish, is there a way to make timeout time longer? Thanks, Dennis Huang
0
1000
by: Gill | last post by:
As per documentation "ODBCCOnnection.ConnectionTimeout > Gets or sets the time to wait while trying to establish a connection before > terminating the attempt and generating an error." > > How to set the timeout for executing SQL statements? How long the connection > will wait to excute a statement? >
3
23007
by: Piotrek | last post by:
Hi all. I would like to know what is the difference between these two timeouts: - CommandTimeout - ConnectionTimeout I have following setting in my web.config file: <httpRuntime executionTimeout="60"/>
8
16155
by: fniles | last post by:
Can I change the connection time out in VB.Net 2003 and MS Access (using OLEDbConnection) ? When I use Connect Timeout = 60 in the connectionstring, I get an error "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done." Thanks. ConnectionOLE = New OleDb.OleDbConnection sPath =...
2
11081
by: cj | last post by:
MySQLConnection.connectiontimeout() returns 15. I want to drop that to 3, but it is read only. I see you can include the timeout "Connection Timeout=30" as part of the connection string but I don't necessarily want it at 3 during the connection--just for queries. Is there a way to set it after I'm connected or for it not to affect the...
0
7478
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...
0
7668
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. ...
0
7923
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7773
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...
0
5984
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...
0
4960
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1025
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
722
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.