ADO.NET Connection Pools

Sometimes I run across such a great article that I keep referencing and sending-out to friends or posting to messageboards in response to a question. 

One such article is: “Swimming in the .NET Connection Pool”, SqlServer Magazine, William Vaughn.  However, the follow-up article “The .NET Connection Pool Lifeguard“ closely rivals the original with its valueable performance monitoring content!

2 Comments

  • Interesting... but if you aren't doing the following:



    using (SqlConnection Connection = new SqlConnection())

    {

    // code here

    }



    when you're working with the database, you deserve to have problems.



    Jimbob

  • I appreciate your concern, but my point was to share these articles with others who may want to better understand ADO.NET, Connections, and Connection Pools.



    As for your code-snippet; the use of "using(){...}" statements is only 1 of many mechanisms for ensuring a connection is closed. In some cases it makes sense, in others you may need more granular control over disposal by writing your own "Try..Finally".



    What is more important is the knowledge and understanding of what happens if you fail to manage your connections wisely.

Comments have been disabled for this content.