|
| 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.
| A.M |
| GOOD ANSWER |
Hi,
Can I define connection's timeout in SqlConnection's connection string ?
Thanks, Alan
|
|
|
| |
|
|
| |
| |
| William \(Bill\) Vaughn |
| GOOD ANSWER |
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]
|
|
|
| |
|
|
| |
| |
| Warren Patterson |
| GOOD ANSWER |
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]
|
|
|
| |
|
|
| |
| |
| Angel Saenz-Badillos[MS] (VIP) |
| GOOD ANSWER |
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]
|
|
|
| |
|
|
| |
|
|
|
|
|
|
|
|
|
|
BootFX
Reliable and powerful .NET application framework. |
|
|
|
|
|
|