INFO: Changes in ADO 1.5 That Affect Visual C++/J++ ProgrammersID: Q177939
|
With the release of ActiveX Data Objects (ADO) version 1.5, several minor changes have been made that may affect code when recompiled to use ADO 1.5 for Visual C++ or Visual J++. This article outlines the changes and the steps you need to take to compensate for the changes. Not all of the changes affect both Visual C++ and Visual J++; this article indicates which issues are language specific.
#include <initguid.h> // Newly Required for ADO 1.5.
#include <adoid.h>
#include <adoint.h>
LNK2001: unresolved external symbol _CLSID_CADORecordset
http://www.microsoft.com/data/oledbYou may also receive the following error if you build a project linking to the 1.0 Adoid.lib and including the 1.5 Headers:
LNK2005: "xxx" already defined in "yyy" errors
#include <initguid.h>
#include <adoid.h>
#include <adoint.h>
// VC using #import
Conn1->Open( bstrEmpty, bstrEmpty, bstrEmpty, -1 );
// VC using MFC OLE
Conn1.Open( strEmpty, strEmpty, strEmpty, -1 );
// VC Using OLE SDK
if( SUCCEEDED( hr ) )
hr = Conn1->Open( bstrEmpty, bstrEmpty, bstrEmpty, -1 );
// Java Code
conn1.Open("", "", "", -1);
If you use the incorrect value for this argument, the following error
occurs:The application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another.800A0BB9 or (adErrInvalidArgument = 3001)
For additional information, please see the following articles in the
Microsoft Knowledge Base:
Q130869 HOWTO: Avoid Error LNK2001 Unresolved External Using DEFINE_GUID
Q182389 FILE: Adovcbm.exe ADO 1.5 with #import and Getrows/Bookmarks
Q184968 FILE: Adovcsp.exe Demonstrates Using Stored Procedures with ADO
Q186387 SAMPLE: Ado2atl.exe Returns ADO Interfaces from COM
Q181733 FILE: Adovcbtd.exe #import Using UpdateBatch and CancelBatch
Additional query words: Parameter Arguments Differences kbdse
Keywords : kbADO kbVC kbVJ
Version : WINDOWS:1.0,1.1,1.5,6.0; winnt:4.2b,5.0,6.0
Platform : WINDOWS winnt
Issue type : kbinfo
Last Reviewed: March 13, 1999