- Microsoft Visual C++
- Microsoft Visual Basic for Applications (VBA)
- Microsoft Visual Basic 6
- Microsoft .NET applications
Error message 1
#import " msado15.dll" no_namespace rename("EOF","EndOfFile")
_ConnectionPtr pConnection = NULL;
HRESULT hr = pConnection.CreateInstance(__uuidof(Connection)); //hr gets E_NOINTERFACE here
Private Sub Form_Load()
Dim Conn As New ADODB.Connection ‘Runtime error here: Class does not support Automation or does not support expected interface
Note Microsoft no longer supports the primary interop assembly for ADO and no longer supports Visual Basic 6. For more information about Visual Basic 6 supportability, visit the following MSDN webpage:
- In Windows 7 and in earlier versions of Windows, the _Connection IID is 00000550-0000-0010-8000-00AA006D2EA4.
- In Windows 7 SP1, the _Connection IID is 00001550-0000-0010-8000-00AA006D2EA4, and the IID for _Connection_Deprecated is 00000550-0000-0010-8000-00AA006D2EA4.
Some ADO APIs are platform-dependent in ADO 2.7 and in later versions. On 64-bit versions of Windows, these ADO APIs process arguments by using a 64-bit data type (such as the LONGLONG data type). However, applications that use these APIs still use the LONG data type. Therefore, you receive a "Type Mismatch" error message when you try to run the macro.