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

Last reviewed: August 7, 1997
Article ID: Q148745
The information in this article applies to:
  • The DAO SDK included with: Microsoft Visual C++, 32-bit Edition, versions 4.0 and 4.1

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 : MfcDAO kbbuglist
Version : 4.0 4.1
Platform : NT WINDOWS
Issue type : kbprb


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: August 7, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.