Microsoft Knowledge Base Email Alertz

(833388) - You cannot create out-of-process providers with Microsoft Data Access (MDAC) OLE DB components.

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 833388 - Last Review: December 30, 2003 - Revision: 1.1

You cannot create out-of-process providers with MDAC OLE DB components

SUMMARY

You cannot create out-of-process providers with Microsoft Data Access (MDAC) OLE DB components.

MORE INFORMATION

You cannot marshal OLE DB interfaces across process boundaries with MDAC OLE DB components. MSDAPS.dll is a Component Object Model (COM) proxy-stub DLL. Although MSDAPS.dll is available for OLE DB, you can only use this DLL with Microsoft SQL Server. You can invoke provider components as out-of-process components in SQL Server. MSDAPS.dll handles only the interfaces that SQL Server uses, and MSDAPS.dll is tested only for SQL Server. Therefore, you can only use the MSDAPS.dll DLL with SQL Server.

To use MDAC OLE DB components to create in-process providers, specify the CLSCTX_INPROC_SERVER enumeration value for the dwClsContext parameter when you call the CoCreateInstance method. To do this, use code that is similar to the following code:

OLE DB 1.x

CoCreateInstance(CLSID_MSDASQL, NULL, CLSCTX_INPROC_SERVER, IID_IDBInitialize,(void**)pIDBInitialize);

OLE DB 2.0 and later

CoCreateInstance(CLSID_MSDAINITIALIZE, NULL, CLSCTX_INPROC_SERVER, IID_IDataInitialize,(void**)&pIDataInitialize);
 
Additionally, specify the CLSCTX_INPROC_SERVER enumeration value for the dwClsCtx parameter when you call the CreateDBInstance method. To do this, use code that is similar to the following code:
pIDataInitialize->CreateDBInstance(CLSID_MSDASQL, NULL, CLSCTX_INPROC_SERVER,NULL, IID_IDBInitialize,(IUnknown**)&pIDBInitialize);

APPLIES TO
  • Microsoft Data Access Components 2.8
  • Microsoft Data Access Components
Keywords: 
kbprovider kbcompmodel kbcominterop kbdll kbinfo KB833388
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate