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



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: 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)
  • Re: Timout control with RPC/HTTP
    ... please also check the RPC web site connection timeout settings ... Maybe the idle timeout settings depend on here. ...
    (microsoft.public.exchange.admin)
  • Re: web serivce: client side timeout?
    ... client side but only from the server side. ... System.Net.Sockets.SocketException: A connection attempt failed ... asyncResult, Int32 timeout, Exception& exception) ... John Saunders | MVP - Windows Server System - Connected System ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: Timout control with RPC/HTTP
    ... But it is a IDLE timeout period that I am looking to control. ... But when they are idel the connection status will say - " last updated ...." ... Where do I control the settings for outlook to reconnect to the server to see if the mailbox is in sync with the remote lcoal cache. ... Microsoft CSS Online Newsgroup Support ...
    (microsoft.public.exchange.admin)