Connection Pooling.

L

Lee G.

Hi,

I've got a small C# application that connects to my database via the
..NET OLE DB managed provider and it targets the 1.0 version of the
..NET framework. Pooling seems to be working fine, and I'm not seeing
multiple connections fired up during a run through the app. However,
when I target the 1.1 version of the framework, several connections
are being created which leads me to think that either pooling is not
working or the connections are not being disposed of correctly.

I've got a finally{} at the end of each method that connects to the
database, so I know that I'm releasing my connections correctly. And,
I am using the same connection string and object througout the
application.

My question is: Is there a difference in how connections are handled
in each of the versions of the framework? And if so, what are they?

Cheers!
 
A

Angel Saenz-Badillos[MS]

Lee,
The Oledb provider is a managed wrapper for a native Oledb provider and does
not currently implement pooling, there should be absolutely no changes in
pooling from v1.0 to v1.1.

Pooling in Oledb is handled by the native Oledb provider that you are using
(look at your connection string at the Provider=<your oledb provider here>),
and is controlled by a registry key. Is it possible that somebody has
tweaked this registry key or that you are using a different version of the
native provider? If you are using a native Oledb provider from Microsoft did
you upgrade MDAC when you moved from 1.0 to 1.1? If so I would be very
interested in getting more information about this problem.

To find the registry key that controls native Oledb pooling look in your
regedit app for OLEDB_SERVICES,
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/oledb/htm/olprcore_chapter19_8.asp

Thanks,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top