Follow @RoyOsherove on Twitter

Disabling Connection Pooling

ADO.NET Data Providers automatically use connection pooling turned on. If you want to turn this functionality off:

In an SQLConnection object, Add this to the connection string:

Pooling=False;

In An OLEDBConnection object, add this:

OLE DB Services=-4;

This way, the OLE DB data provider will mark your connection so that it does not participate in connection pooling.

P.S

This post was written using Scott's new Blogert.

It Rocks!

Stop The Silliness

A Little Macro To Automate Creating Connection Strings