Article ID: 259379 - Last Review: July 1, 2004 - Revision: 1.1 How To Develop with ADO Version 2.5 or Later and Install on ADO Version 2.0This article was previously published under Q259379 SUMMARY
Developers often have the latest software, while their customers may use an older version. Microsoft Windows 2000 comes with Microsoft Data Access Components (MDAC) version 2.5 installed. Developers who use Windows 2000 and who want to install their application on systems that are running versions of MDAC prior to version 2.5 cannot develop their application by using the latest Msado15.dll file.
On MDAC version 2.5 or later systems, Microsoft Visual Basic programmers who add a reference to Msado15.dll and Microsoft Visual C++ programmers who #import Msado15.dll, create images that will not run on systems that are running an earlier version of MDAC (for example MDAC version 2.1 GA). Any attempt to run an image that was developed on MDAC version 2.5 or later on a earlier-version system produces an error message similar to the following (for Visual Basic):
Run time error '430':
Class does not support Automation or does not support expected interface
Error 0x80004002 No such interface supported
MORE INFORMATION
These errors are caused by new ActiveX Data Objects (ADO) interfaces that are referenced in the ADO 2.5 or later-produced image and that are not found in the Msado15.dll file on the target system.
To prevent this problem, Visual Basic programmers should reference the Msado20.tlb file; Visual C++ programmers should #import Msado20.tlb. The Msado20.tlb type library file is in the ADO folder with Msado15.dll and ships with MDAC version 2.5 or later. If you use the version 2.0 type library, you won't have access to the newer interfaces (such as the Record object). Visual C++ programmers may want to use the following preprocessor definition: Another approach that you can use is to build a project once and use #import to generate the .tlh and .tli files, and then add the following to exactly one .cpp file: REFERENCESFor additional information, click the article numbers below
to view the articles in the Microsoft Knowledge Base:
182389
(http://support.microsoft.com/kb/182389/EN-US/
)
FILE: Adovcbm.exe ADO 1.5 with #import and Getrows/Bookmarks
252317
(http://support.microsoft.com/kb/252317/EN-US/
)
ROWLOCK.EXE Demonstrates Row-Level Locking Using ADO
APPLIES TO
| Article Translations
|


Back to the top
