473,395 Members | 1,504 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

How to provide a CommandTimeout at the Connection level.

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=mySQLServe r;Command Timeout=500"

Thanks.
Nov 17 '05 #1
1 2882
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 <no**@none.com>
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: <#$**************@TK2MSFTNGP12.phx.gbl>
Newsgroups: microsoft.public.dotnet.languages.csharp
NNTP-Posting-Host: 207.230.140.240
Lines: 1
Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSF TNGP08.phx.gbl!TK2MSFTNGP1
2.phx.gblXref: 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=mySQLServ er;Command Timeout=500"

Thanks.


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

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Tim Meagher | last post by:
I am running ASP code that was migrated from a Windows 2000 Server to a Windows 2003 server. For some reason the connection timeout or command timeout are getting ignored and my query time sout...
12
by: Piotrek | last post by:
HI all. In my web site I have some ObjetDataSource. Its business object property is set to my dataset I created in dataset designer (this dataset has table adapter). My question is: how can I...
3
by: Piotrek | last post by:
Hi all. I would like to know what is the difference between these two timeouts: - CommandTimeout - ConnectionTimeout I have following setting in my web.config file: <httpRuntime...
1
by: Stephen | last post by:
Does anyone know if I can set the commandtimeout in the web.config for my whole application or do I need to change this for every call. I want to quickly change this globally if I can without...
4
by: Piotrek | last post by:
Hi all. I am developing some web application in which I use datasets, which were generated using dataSetDesigner. My dataset has a TableAdapter, which has GetData method. Users of my application...
5
by: Suresh | last post by:
Hi Guys I have Db2 server installed on remote server. i am connecting to that remote server by using VPN. I want to connect that remote DB2 server instance using my local machine DB2...
0
by: czerwww | last post by:
Can someone please help me? I have class for database connection and I need set command.commandTimeout. How can I do that? Code: Imports System.Data.SqlClient Imports System.Data Public Class...
0
by: =?Utf-8?B?ZGF2ZQ==?= | last post by:
The following finishes in 1 hour instead of erroring after 1 second as expected. Dim cn As New System.Data.SqlClient.SqlConnection cn.ConnectionString = "Server=(local); Database=master; User...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.