views:

58

answers:

1

How does the OleDbConnection constructor know what provider DLL (I assume it's a DLL) to call for a given provider name in the connection string? For example, in the following code...

string cnStr = "Provider=Sybase.ASEOLEDBProvider.2;Server Name=etc...";
OleDbConnection cn = new OleDbConnection(cnStr);

How does OleDbConnection know where to find Provider=Sybase.ASEOLEDBProvider.2?

I'm trying to debug a data access problem in my Winforms app and I think it may be related to a driver bug that's been fixed, so I may need to upgrade my DLL.

+2  A: 

The mapping is done in the registry. For SQLOLEDB, I have a assembly location of %CommonProgramFiles%\System\Ole DB\sqloledb.dll under the appropriate class id.

JP Alioto
Got it. Thanks.
John M Gant
You're welcome, glad to help!
JP Alioto