SQL connection timeout -- is it pretty useless or what?
- From: "Rob R. Ainscough" <robains@xxxxxxxxxxx>
- Date: Fri, 7 Jul 2006 12:40:16 -0700
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.
.
- Follow-Ups:
- Re: SQL connection timeout -- is it pretty useless or what?
- From: William \(Bill\) Vaughn
- Re: SQL connection timeout -- is it pretty useless or what?
- From: Marina Levit [MVP]
- Re: SQL connection timeout -- is it pretty useless or what?
- Prev by Date: How to set the SmallDateTime field
- Next by Date: Re: SQL connection timeout -- is it pretty useless or what?
- Previous by thread: How to set the SmallDateTime field
- Next by thread: Re: SQL connection timeout -- is it pretty useless or what?
- Index(es):
Relevant Pages
|