.NETGURU
Connection Timeout
Messages   Related Types
This message was discovered on microsoft.public.dotnet.framework.adonet.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.
Post a new message to this list...

A.M
Hi,

Can I define connection's timeout in SqlConnection's connection string ?

Thanks,
Alan

Reply to this message...
 
    
William \(Bill\) Vaughn
You mean besides using the ConnectionString "Connection timeout=xx;" option?

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________

"A.M" <Click here to reveal e-mail address> wrote in message
news:Click here to reveal e-mail address...
[Original message clipped]

Reply to this message...
 
    
Warren Patterson
server=myServer;uid=myUser;pwd=myPassword;database=myDatabase;Connect
Timeout=60

Connect Timeout=60

"William (Bill) Vaughn" <Click here to reveal e-mail address> wrote in message
news:Click here to reveal e-mail address...
> You mean besides using the ConnectionString "Connection timeout=xx;"
option?
[Original message clipped]

Reply to this message...
 
    
Angel Saenz-Badillos[MS] (VIP)
Be aware that the Connection Timeout value is "at least" x instead of "at
most" x seconds. We will not automatically abort the connection attempt when
the timeout is reached. Think of a loop:

Try to connect loop:
If time is greater than Connection Timeout exit.
call win32 api; //this can take some time.
End try to connect loop.

In this scenario your worst case connection timeout will be Connection
Timeout -1 + time it takes to do win32 api call. In some cases, like a
server that is down this can add up to a significant chunk of time.

--
Angel Saenz-Badillos [MS] Managed Providers
This posting is provided "AS IS", with no warranties, and confers no
rights.Please do not send email directly to this alias.
This alias is for newsgroup purposes only.
I am now blogging about ADO.NET: http://weblogs.asp.net/angelsb/

"Warren Patterson" <Click here to reveal e-mail address> wrote in message
news:#Click here to reveal e-mail address...
[Original message clipped]

Reply to this message...
 
 
System.Data.SqlClient.SqlConnection




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification