Every time I try to create an ADODB.Connection object, I receive the following error:
-----------
Runtime Error '-2147024703 (800700c1)':
Automation error
%1 is not a valid Win32 Application.
-------------
I am running Windows 7 Ultimate (64 bit).
This IS NOT a connection string problem, nor is it application-specific.
I can easily reproduce the error in a number of ways:
(Method 1 VB or VBA Direct Reference)
Using visual basic 6 IDE OR Microsoft Office VBA IDE, add a reference to Microsoft ActiveX Data Objects (I have tested versions 2.6, 2.7, 2.8, and 6.0). Add a code module with the following code:
Expand|Select|Wrap|Line Numbers
- Dim oConn As ADODB.Connection
- Set oConn = New ADODB.Connection
(Method 2 VB or VBA CreateObject)
Using visual basic 6 IDE OR Microsoft Office VBA IDE, add a code module with the following code:
Expand|Select|Wrap|Line Numbers
- Dim oConn As Object
- Set oConn = CreateObject("ADODB.Connection")
(Method 3 WSH) Create a wsh vbs script with the following code:
Expand|Select|Wrap|Line Numbers
- dim obj: set obj = wScript.CreateObject("ADODB.Connection")
Clearly, the above 3 methods show that this error is not related to a specific application etc. but is instead a problem with ADO itself or the installation of MDAC/Windows DAC on my machine. Perhaps it is some conflict of ADO with a 64bit machine.
Can anyone confirm using Windows 7 Ultimate with VB6 professional installed whose ADO IS working?
Can anyone suggest how I might go about repairing Windows DAC 6.0? I have not found a way to do so in any forum I have checked.
Thanks for any help and suggestions you can offer!