INFO: Maintaining Binary Compatibility in Components with ADOR

Article translations Article translations
Article ID: 216389 - View products that this article applies to.
This article was previously published under Q216389
This article has been archived. It is offered "as is" and will no longer be updated.
Expand all | Collapse all

SUMMARY

Originally, ADOR was designed to be a standalone component. However, as ADO has evolved in design and use, this is no longer ADOR's purpose. ADOR is now only a sub to the MSADO15.DLL and exists only to maintain backward compatibility.

Recompiling a Visual Basic project that uses Binary Compatibility and ADOR generates a warning to the following effect:
"...module has arguments and/or return type that is incompatible with a similar declaration in the version compatible component.

Original Definition: Function function_name as ADOR.Recordset20
Current Definition: Function function_name as ADOR.Recordset"
The dialog box offers a choice to either accept and break the compatibility or edit and preserve the return types or arguments.

The newer version of the ActiveX Data Objects Recordset (ADOR) library uses newer interfaces for the Recordset object. If your component exposes Recordset objects, recompiling with the newer version of ADOR will cause your component to expose those new interfaces and break Binary Compatibility, which is why the dialog box appears.

MORE INFORMATION

ADOR (MSADOR15.DLL) is a subset of ADODB (MSADO15.DLL). ADOR only exposes the Recordset interface. ADOR and ADODB share identical GUIDs for shared objects, such as the Recordset, under the same version of ADO, and thus there is no need to explicitly use ADOR in any application development.

If you originally built your component with ADOR 2.0 and you now have MDAC 2.1 installed, you can replace the reference to ADOR 2.1 with a reference to the ADO 2.0 type library (MSADO20.TLB). This type library was designed to allow you to use ADO 2.0 interfaces even though ADO 2.1 is installed on the machine. For more information on this type library, please see article Q201576 in the REFERENCES section below. Once you have referenced the ADO 2.0 type library, you can replace all code that uses the ADOR.Recordset syntax with code that uses the ADODB.Recordset syntax. After these changes are made, the project should compile without complaining about a break in Binary Compatibility.

If you originally built your component with ADOR 1.5 and you now have MDAC 2.0 or 2.1 installed on your machine, please read article Q195049 referenced below. While this article was written for maintaining Binary Compatibility for components originally compiled with ADO 1.5, the same information applies to ADOR 1.5. Both ADO and ADOR 2.0 can expose (but not create) Recordset15 interfaces. Both ADO and ADOR 2.1 can expose (but not create) Recordset15 and Recordset20 interfaces.

REFERENCES

For additional information about ADOR, please see the following articles in the Microsoft Knowledge Base:
201576 INFO: ADO 2.1 Ships with an ADO 2.0 Type Library

195049 HOWTO: Maintain Binary Compatibility in Components Exposing ADO

Properties

Article ID: 216389 - Last Review: February 21, 2014 - Revision: 2.2
APPLIES TO
  • Microsoft ActiveX Data Objects 2.0
  • Microsoft ActiveX Data Objects 2.1
  • Microsoft ActiveX Data Objects 2.5
  • Microsoft ActiveX Data Objects 2.6
  • Microsoft ActiveX Data Objects 2.7
  • Microsoft Data Access Components 2.0
  • Microsoft Data Access Components 2.1
  • Microsoft Data Access Components 2.5
  • Microsoft Data Access Components 2.6
  • Microsoft Data Access Components 2.7
Keywords: 
kbnosurvey kbarchive kbinfo KB216389

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com