FILE: Adoreg.exe License Key Registration DLL and ADO Use Tips

Last reviewed: March 5, 1998
Article ID: Q172394
The information in this article applies to:
  • ActiveX Data Objects (ADO)

SUMMARY

This article attempts to provide a definitive solution to the ADO 1.0 Redistribution/License Key issue. It references a file you can download that contains a DLL that adds the ADO License Key. This License Key may, or may not, be necessary, depending on the language you use to manipulate ADO objects.

MORE INFORMATION

The following file is available for download from the Microsoft Software Library:

 ~ Adoreg.exe (size: 32891 bytes) 

For more information about downloading files from the Microsoft Software Library, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q119591
   TITLE     : How to Obtain Microsoft Support Files from Online Services

What is Adoreg.dll?

Adoreg.dll simply adds the ADO registry key when registered by regsvr32 or when the DLL's DllRegisterServer() function is called.

This DLL will not be sufficient to allow VB developers to redistribute ADO- based applications; however, an expanded version designed to work with the VB Setup Wizard (AdoRegEx.DLL) is available separately and described in a separate KB (described further below).

Where and When is the ADO License Key Needed?

The license key is needed in the registry on any development machine (as well as OLE-DB and ADO). The best way to get this is installing the OLE-DB SDK, Active Server Pages 1.0 or Visual InterDev 1.0.

When considering if you need to install the license key on your client machine, keep the following points in mind:

  • The License Key is needed in the registry at compile time if your application performs early binding to ADODB 1.0 objects:

          dim rs as new ADODB.Recordset                 // VBA
          -or-
          set rs = new ADODB.Recordset                  // VBA
    
    
  • The License Key is needed in the registry at run time if your application performs late binding to ADODB 1.0 objects:

          set rs = CreateObject( "ADODB.Recordset" )   // VBA, VBScript
          -or-
          CoCreateInstance(...);                       // C/C++ w/Win32
          -or-
          _ConnectionPtr   Conn1 = NULL;               // C++ w/#import
          hr = Conn1.CreateInstance( __uuidof( Connection ) );
    
    
  • The License Key needs to be provided via IClassFactory2 for the first ADODB object created if the license key does not exist in the registry. For additional information, please see the following article in the Microsoft Knowledge Base:

    ARTICLE-ID: Q169496

       TITLE     : INFO: Using ActiveX Data Objects (ADO) via #import in VC++
    
    

When is Early or Late Binding Used?

The following discussion lists various development products, and how to handle license keys, early and late binding. All of these discussions assume both ADO and OLE-DB DLLs are installed correctly on your machine.

Visual Basic:

You will not need a License key on the client machine if you use early binding to create your ADO objects. This, and techniques for redistributing ADO successfully with the Visual Basic Setup Wizard are documented in the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q172406
   TITLE     : FILE: Redistributing ADO 1.0 with Visual Basic 5.0

Visual C++:

You will need to either pass the ADO License Key to the first object you create, or you will need to add the ADO License Key to each client machine. Adoreg.dll will let you do the latter, and the following KB discusses how to build ADO objects and pass the license key.

   ARTICLE-ID: Q169496
   TITLE     : HOWTO: Passing a License Key to Classes Generated by
               #import

While this article is specific to #import, the technique provided can be used when invoking ADO using the OLE SDK or with MFC OLE without #import.

Visual J++:

Visual J++ 1.X encapsulates typelibs with a set of classes, providing early binding at compile time. Therefore you shouldn't need a license key on your client machines.

Active Server Pages 1.0 and VBScript:

As Active Server Pages (ASP) are interpreted, not compiled, you will need to have the license key on any server where the ASP page resides. This is typically done when you install ASP automatically. However, if you distribute your VBScript based application independent of ASP, you will need to have the license key available on any client machine.

How Do I Install ADO and OLE-DB DLLs on the Client Machine?

For additional information, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q168122
   TITLE     : HOWTO: Redistributing ADO 1.0 or ADO/R 1.0 with OLE/DB 1.1

Will We Have a License Key in the Future?

No. While ADO 1.0 is freely redistributable (even with the license key), future releases of ADO will be freely redistributable without a license key.

Keywords          : adoall adoengdb adoiis adovb adovc adovi adovj
Version           : WINDOWS:
Platform          : WINDOWS
Issue type        : kbfile


================================================================================


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: March 5, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.