Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ConnectionTimeout

0 views
Skip to first unread message

BVM

unread,
Sep 30, 2003, 9:55:04 PM9/30/03
to
Hi:
 
Do you know how to change Connection timeout time? By default it's 15s, Now I want to change it to 30s. However SqlConnection.ConnectionTimeout is read only. What should I do?
 
Also if the SQL query is to long and need several minutes to finish, is there a way to make timeout time longer?
 
Thanks,
 
Dennis Huang

Greg Ewing [MVP]

unread,
Oct 1, 2003, 7:34:03 AM10/1/03
to
Dennis, you can change the Connection Timeout property in your Connection
string. Just set tthe value to whatever you want it to be. That will then
change the ConnectionTimeout property on your SqlConnection object.

--
Greg Ewing [MVP]
http://www.citidc.com

"BVM" <Den...@TBH.com.au> wrote in message
news:O$WIZ67hD...@TK2MSFTNGP10.phx.gbl...

Manoj G [MVP]

unread,
Oct 1, 2003, 11:39:54 AM10/1/03
to
Hi,
 
In your case, you should consider setting the CommandTimeout property of the command object instead. ConnectionTimeout is a timeout value for establishing a connection, not executing commands.
BTW, to you can set the connection timeout as a part of the connection string.
For eg: "Database=northwind;server=myServer;Connect Timeout=30;Integrated Security=SSPI"
 

Greg Low (MVP)

unread,
Oct 6, 2003, 5:27:32 AM10/6/03
to
And don't set it to zero (ie unlimited). Unfortunately, it currently really means ZERO.
 
HTH,

--
Greg Low (MVP)
MSDE Manager SQL Tools
www.whitebearconsulting.com
"Manoj G [MVP]" <manuth...@hotmail.com> wrote in message news:uqdu0KDi...@TK2MSFTNGP10.phx.gbl...
0 new messages