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]" <ma**********@hotmail.com> wrote in message news:uq**************@TK2MSFTNGP10.phx.gbl...
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"
--
HTH,
Manoj G [.NET MVP]
http://www15.brinkster.com/manoj4dotnet
"BVM" <De*****@TBH.com.au> wrote in message news:O$**************@TK2MSFTNGP10.phx.gbl...
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