How to provide a CommandTimeout at the Connection level.

  • Thread starter Thread starter Frank Rizzo
  • Start date Start date
F

Frank Rizzo

Hello,

Is there a way to provide a Command Timeout value (not Connection
Timeout) in the ConnectionString, like there used to be in ADO?

Something like
conn.ConnectionString = "Integrated
Security=SSPI;database=northwind;server=mySQLServer;Command Timeout=500"

Thanks.
 
I don't know about the connection string, but SqlCommand objects have a
CommandTimeout property that you can set. This gives you the added
flexability of specifying different timeout values for different SQL
commands.

hth

-Joel
--------------------
Date: Wed, 27 Apr 2005 11:49:28 -0700
From: Frank Rizzo <[email protected]>
User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Subject: How to provide a CommandTimeout at the Connection level.
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Message-ID: <#$#[email protected]>
Newsgroups: microsoft.public.dotnet.languages.csharp
NNTP-Posting-Host: 207.230.140.240
Lines: 1
Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP1
2.phx.gbl
Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.dotnet.languages.csharp:323469
X-Tomcat-NG: microsoft.public.dotnet.languages.csharp

Hello,

Is there a way to provide a Command Timeout value (not Connection
Timeout) in the ConnectionString, like there used to be in ADO?

Something like
conn.ConnectionString = "Integrated
Security=SSPI;database=northwind;server=mySQLServer;Command Timeout=500"

Thanks.

This reply is provided AS IS, without warranty (express or implied).
 
Back
Top