PRB: DAO Can't Be Used in an ISAPI DLL (148745)
The information in this article applies to:
- The DAO SDK, when used with:
- Microsoft Visual C++, 32-bit Editions 4.0
- Microsoft Visual C++, 32-bit Editions 4.1
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"
Modification Type: | Major | Last Reviewed: | 10/24/2003 |
---|
Keywords: | kbDatabase kbprb KB148745 |
---|
|