November 21, 2014
Hot Topics:

What .NET 2.0 Has in Store for ADO.NET

  • May 11, 2005
  • By Mark Strawmyer
  • Send Email »
  • More Articles »

Connection Pool Control

Not all of the providers support connection pooling. The SQL Server and Oracle providers do. There was previously no way to programmatically clear the pool of open connections. The upcoming release of ADO.NET will include the ability to clear the connection pool in the SqlClient and OracleClient providers through static methods on the corresponding connection objects.

Connection Pool Control Sample Code

The following sample code demonstrates the use of the static methods to clear the connection pools:

// Clear all the poolsSystem.Data.SqlClient.SqlConnection.ClearAllPools();// Clear a specific poolSqlConnection dbconn = new SqlConnection();dbconn.ConnectionString =    ConfigurationSettings.AppSettings.Get("ConnectionString");SqlConnection.ClearPool(dbconn);

Other Considerations

You may want to examine many more new additions in ADO.NET 2.0 than the ones covered here. You'll find a number of additional articles that may serve your research. The following links on related topics will get you started:

Future Columns

The next column has yet to be determined. If you have something in particular that you would like to see explained, please e-mail me at mstrawmyer@crowechizek.com.

About the Author

Mark Strawmyer, MCSD, MCSE, MCDBA is a Senior Architect of .NET applications for large and mid-size organizations. Mark is a technology leader with Crowe Chizek in Indianapolis, Indiana. He specializes in architecture, design, and development of Microsoft-based solutions. Mark was honored to be named a Microsoft MVP for application development with C# for the second year in a row. You can reach Mark at mstrawmyer@crowechizek.com.



Page 2 of 2



Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 


Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.

Sitemap | Contact Us

Rocket Fuel