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 )
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.
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.
STATUS
This behavior is by design.
REFERENCES
Tech note 67 (TN067), "Database Access from an ISAPI Server Extension"
Additional query words: 4.00 4.10
Keywords: kbdatabase kbprb KB148745