Microsoft KB Archive/148745

= PRB: DAO Can't Be Used in an ISAPI DLL =

Article ID: 148745

Article Last Modified on 10/24/2003

-

APPLIES TO

 The DAO SDK, when used with:  Microsoft Visual C++ 4.0 Standard Edition

 Microsoft Visual C++ 4.1 Subscription 

-



This article was previously published under Q148745





SYMPTOMS
DAO fails inside an ISAPI DLL. A call to CoGetClassObject or CoCreateInstance for the database engine will fail. You may receive the following HRESULTS: E_OUTOFMEMORY                 (    0x8007000EL ) REGDB_E_IIDNOTREG           (    0x80040155L )

<div class="cause_section">

CAUSE
DAO wasn't tested or designed to work in an ISAPI DLL. The problem lies within the way the Internet Information Server handles OLE.

<div class="resolution_section">

RESOLUTION
Do one of the following:


 * Don't use DAO. Because DAO is non-thread safe, Microsoft recommends that you not use it in an ISAPI DLL. The SQL Server ODBC driver works well with an ISAPI DLL and is a good choice for scaleable solutions.

-or-
 * Use the Internet Data Connector feature of the Microsoft Internet Information Server to connect to the database file. See the online documentation for the Microsoft Internet Information Server for more information about the Internet Data Connector.

-or-
 * Write a CGI application to get to DAO rather than calling DAO in an ISAPI DLL.

<div class="status_section">

STATUS
This behavior is by design.

<div class="references_section">