Re: Connection Timeout
- From: Arild Bakken <arild.bakken@xxxxxxxxxxxxxxxx>
- Date: Thu, 26 Jul 2007 11:44:15 +0200
Andrew J. Kelly wrote:
I don't see the distinction for this. It is just a property (CommandTimeOut) that you set for the connection. It should not matter what the client or the server is or what they do.
The article he pointed you to does indeed describe how to use the ConnectionTimeout property of the ADODB.Connection object, which is similar to what you want.
If you are using the SqlConnection object on .NET 2.0 you'll notice that the ConnectionTimeout property is readonly. What you need to do is include the connection timeout in the connection string.
"Data Source=SERVERNAME;Initial Catalog=DBNAME;Integrated Security=SSPI;Connect Timeout=5"
which will give you a 5 second timeout on the connection.
Arild
.
- Follow-Ups:
- Re: Connection Timeout
- From: tc
- Re: Connection Timeout
- From: tc
- Re: Connection Timeout
- References:
- Connection Timeout
- From: tc
- Re: Connection Timeout
- From: Andrew J. Kelly
- Re: Connection Timeout
- From: tc
- Re: Connection Timeout
- From: Andrew J. Kelly
- Connection Timeout
- Prev by Date: Re: Like Bug with Sql Server 2005
- Next by Date: Re: sp_executeSQL Database Files.
- Previous by thread: Re: Connection Timeout
- Next by thread: Re: Connection Timeout
- Index(es):
Relevant Pages
|
Loading