Home All Groups Group Topic Archive Search About

SqlConnection ConnectionTimeout Before and After Pool Is Created

Author
22 Feb 2007 10:51 PM
scott.ballard
Greetings,

Does the ConnectionTimeout property in the SqlConnection class refer
the total time to create the connection pool, if necessary, and return
a connection, OR just the total time to return a connection from an
established pool?  I notice that in the connection string for a
SqlConnection object the ConnectionTimeout can be specified (default
15 s).  It's my understanding the first time I open a connection with
SqlConnection it will create the connection pool and return one of the
connections from the pool.  If I open another connection with the
exact same connection string it will return one of the connections
from the pool.  I know it's a subtle point, but it's important for me
to know exactly what the ConnectionTimeout means.  Undoubtedly, it's
going to take longer to create the connection pool and return a
connection than it is to return a connection from an existing pool.
So why would the same timeout be applied to both?  Thank you for your
replies.

Regards,

Scott

AddThis Social Bookmark Button