George2
George2

Reputation: 45761

SqlConnection.ClearAllPools issue

I am using VSTS 2008 + .Net 3.5 + C# + ADO.Net + SQL Server 2008 Enterprise. I am learning http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.clearallpools.aspx about SqlConnection.ClearAllPools method. I want to know the behavior of this method is, if any connections from connection pool is idle when method ClearAllPools is called, such idle connections will be disconnected from SQL Server? Is that correct understanding?

I did not find related comments from the MSDN link.

Upvotes: 2

Views: 2771

Answers (1)

Henk Holterman
Henk Holterman

Reputation: 273179

The answer is Yes.
But the situations in which this is useful are rare.

Upvotes: 2

Related Questions