Re: SQL connection timeout -- is it pretty useless or what?



The issue is usually that the timeout counter does not start until network
connectivity has been established. If the NIC card can't see the wire, it's
programmed to wait for quite some time before complaining. This is by design
and due to the way the TCP protocol works--it permits you to move wires
around or use a switch/router/hub without worrying that it will disturb the
network. We've talked about this issue for decades--there is no easy way to
resolve it.

hth

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
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.
__________________________________

"Rob R. Ainscough" <robains@xxxxxxxxxxx> wrote in message
news:Of95s0foGHA.2464@xxxxxxxxxxxxxxxxxxxxxxx
I'm trying to code a routine that will test the connection to a server and
I would like to specific how long (aka timeout) the .Open() should wait
before a timeout error is triggered.

I've tried "connection timeout=10;" in the connect string, but that still
doesn't timeout til 30 seconds have passed. I can't set the
Connection.ConnectionTimeout as that is a read only property. So am I out
of luck? Is there no way to quickly test a SQL connection in .NET 2.0?
Operative being quickly as in I can define how long to wait?

Please tell me I don't have to initiate a thread for the SQL connection
and have the thread stop after xx seconds. There must be a more simple
approach no?? VS 2005 is supposed to be RAD (rapid application
development) not WAAD (work around application development).

Thanks, Rob.




.



Relevant Pages

  • Re: SQL connection timeout -- is it pretty useless or what?
    ... What is sounds like your suggesting, it that the OS DDK for network drivers ... timeout interval is still a useless setting in all but the most extreme ... Connection timeout was more useful in the ... wire, it's programmed to wait for quite some time before complaining. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: SQL connection timeout -- is it pretty useless or what?
    ... Framework APIs that can test for network availability but they too are ... It seems to me that building in this timeout to permit "move wires around" ... wire, it's programmed to wait for quite some time before complaining. ... Please tell me I don't have to initiate a thread for the SQL connection ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Frequent timeouts, Internet connectivity problem
    ... connection, but it sounds like you've ruled that out.) ... > Sites will timeout and not load anything. ... > * Your network may have been broken or gone down. ... Automatic updates occurred without incidents to SP2. ...
    (microsoft.public.windowsxp.network_web)
  • Re: OE6 does not connect with pop3 server
    ... Can we infer from this that you got a timeout on the EarthLink account ... My point about making an approximate timestamp is just to look at the ... E.g. as near as possible before the connection ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)
  • Re: Timout control with RPC/HTTP
    ... specifies the minimum connection timeout used by the ... client and RPC Proxy, in seconds. ... Microsoft CSS Online Newsgroup Support ...
    (microsoft.public.exchange.admin)

Loading