Article ID: 225132 - View products that this article applies to.
This article was previously published under Q225132
This article has been archived. It is offered "as is" and will no longer be updated.
An attempt to #import Msdasc.dll to gain access to the DataLink COM object and OLE DB connection dialog results in the following compiler error in Visual C++:
The same #import of Msdasc.dll worked properly in ADO 2.0 but does not work in ADO version 2.1.
fatal error C1083: Cannot open type library file: 'C:\Program Files\Common Files\System\OLE DB\msdasc.dll': Error loading type library/DLL.
The type library for the DataLink COM object is no longer in Msdasc.dll. The type library has been moved into Oledb32.dll.
Steps to Reproduce BehaviorThe following code sample demonstrates how to use the DataLink COM object in Visual C++ using the #import directive.
NOTE: ADO 2.1 is available with MDAC 2.1, whereas ADO 2.0 is shipped with MDAC 2.0.