Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ADODB.Connection Automation Error

1,762 views
Skip to first unread message

ricovox

unread,
Jan 29, 2010, 3:50:06 PM1/29/10
to
Hi,

I am running the retail (RTM) version of Windows 7 ultimate.
Ever since I installed the operating system, programs that use ADO no longer
work.

Whether in Windows Scripting Host, MS Office VBA, or VB6, whenever I try to
create an ADODB.Connection object, I get the following error:

Database Error
---------------------------
There was an error opening the database:

Error -2147024703 - Automation error
%1 is not a valid Win32 application.
---------------------------

Note that the error occurs even before any connection is opened (i.e. before
Connection.Open(connstring) is called) So this is NOT connection-string or
DNS related. The error occurs when the connection object is created.

e.g.

set objConn = new ADODB.Connection
or
set objConn = CreateObject(ADODB.Connection)

Note also that WDAC (6.0) IS installed as well as MDAC (2.5 - 2.8). I can
add references to these libraries, but no matter which one I use, the results
are the same. I always get that error right at the creation of the conneciton
object.

I would just re-install WDAC, but it seems there is no way to do this on
Windows 7.

I'd appreciate any help or suggestions anyone could offer.
Thanks!

Bob Barrows

unread,
Jan 29, 2010, 4:11:54 PM1/29/10
to
Good luck. I'd appreciate hearing an answer for this if you do have to
resort to calling MS product support. It sounds rather buggy to me so
there is a chance you won't get charged for the call.
--
HTH,
Bob Barrows


Ralph

unread,
Jan 29, 2010, 4:53:11 PM1/29/10
to
ricovox wrote:
> Hi,
>
> I am running the retail (RTM) version of Windows 7 ultimate.
> Ever since I installed the operating system, programs that use ADO no
> longer work.
>
> Whether in Windows Scripting Host, MS Office VBA, or VB6, whenever I
> try to create an ADODB.Connection object, I get the following error:
>
> Database Error
> ---------------------------
> There was an error opening the database:
>
> Error -2147024703 - Automation error
> %1 is not a valid Win32 application.
> ---------------------------
>

As Bob noted - "Good Luck". <g>

This error (unlike many) is telling you exactly what the problem is - for
whatever reason - when it comes to loading the OLE DB suite (WDAC) Windows
thinks you are trying to do so with a 64-bit app and as 32-bit components
can't be used with 64-bit - it hollers.

The Good News - it has nothing to do with your WDAC components or the 32-bit
apps themselves and there IS a cure. The Bad News - only Ghod knows what is
screwed up in the various configurations that causes it.

Everytime we run across this - it is a new adventure. The whole WoW32/64
compatibility layer crap is still a mystery to me but those that keep up
with those things seem to bang out a solution.

Use MS Support.

Be prepared to do a lot of reading about things you could care less about.
Bottom-line - 32/64 compatibility isn't as smooth MS would have you believe.
<g>

-ralph


chaosu

unread,
Feb 3, 2010, 9:47:01 AM2/3/10
to
Hello ricovox,
Would you like to post your VBS here?
At win7 ultimate, I never come across this kind issue. The following script
works very well at win7

Set conn = CreateObject("ADODB.Connection")
Set res = CreateObject("ADODB.Recordset")
Conn.open "Provider=sqloledb;server=xxx;Initial Catalog = master;User
ID=xx;Password=xx"

res.Open "select * from Test002", conn, 1,4
res.close
conn.close

Sergey

unread,
Apr 9, 2010, 10:13:01 AM4/9/10
to
I faced the same problem: after MS Office 2010 Beta 64bit installation, I was
unable to create ADODB.Connection object from 32 bit application. Looks like
Office somehow corrupted my registry or completely removed 32 bit version of
ADO. I would be thankful if there was a repair package for WDAC in my Windows
7.

Has anyone found a solution for that?

ralph

unread,
Apr 9, 2010, 12:52:12 PM4/9/10
to

Not really except to always make a copy of the Registry before
installing any software, expecially beta. And/Or be prepared to
re-install any supporting/release software. (For example,
re-installing Office 32-bit will rebuild the required regestry and not
touch the 64-bit.)

I assume the Release version of 64-bit will address that issue.

-ralph

Sergey

unread,
Apr 15, 2010, 9:06:01 AM4/15/10
to
Is there any news on this one?

Thank you.

Bob Barrows

unread,
Apr 15, 2010, 11:00:17 AM4/15/10
to
Sergey wrote:
> Is there any news on this one?
>
Not from us unfortunately. It appears you will need to make a call to MS
Product Support. If you do, could you please let us know the result so we'll
have something to tell the next person with this problem?

--
Microsoft MVP - ASP/ASP.NET - 2004-2007
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


ralph

unread,
Apr 15, 2010, 5:16:51 PM4/15/10
to

I can't help either.

The main issue is that "beta" part.
Unless you are a partner, on the Beta team, or otherwise have someone
specific to talk to, one seldom gets any reply or feedback. They are
glad to hear about any problems but won't *support* beta products.

I'm surprised that re-installing the 32-bit release product didn't
work. Well, perhaps not too surprised.

Microsoft has always advised installing beta products only on machines
you are willing to reformat. Until recently I generally ignored that
advice - but I've had nothing but problems with all the new ".Nxt"
beta products I've played with. Not that the products didn't work, but
they essentially screwed up going back or installing any new releases.

I now only play on a junk PC or Virtual PC.

-ralph

Sergey

unread,
Apr 19, 2010, 11:09:03 AM4/19/10
to

Bob Barrows

unread,
Apr 19, 2010, 11:52:16 AM4/19/10
to

Thanks for the feedback. i am going to repeat your post here just in
case that link you provided dies:
*****************************************
Fortunately it was not Microsoft Office 2010 problem, but the other
software
that corrupted my registry.

According to these roots:
HKEY_CLASSES_ROOT\CLSID\{00000507-0000-0010-8000-00AA006D2EA4}\InprocSer
ver32
HKEY_CLASSES_ROOT\CLSID\{0000050B-0000-0010-8000-00AA006D2EA4}\InprocSer
ver32
HKEY_CLASSES_ROOT\CLSID\{00000535-0000-0010-8000-00AA006D2EA4}\InprocSer
ver32
HKEY_CLASSES_ROOT\CLSID\{00000541-0000-0010-8000-00AA006D2EA4}\InprocSer
ver32
HKEY_CLASSES_ROOT\CLSID\{00000514-0000-0010-8000-00AA006D2EA4}\InprocSer
ver32
HKEY_CLASSES_ROOT\TypeLib\{00000200-0000-0010-8000-00AA006D2EA4}\2.0\0\w
in32
HKEY_CLASSES_ROOT\TypeLib\{00000201-0000-0010-8000-00AA006D2EA4}\2.1\0\w
in32
HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{00000507-0000-0010-8000-00AA006D2EA
4}\InprocServer32
HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{0000050B-0000-0010-8000-00AA006D2EA
4}\InprocServer32
HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{00000535-0000-0010-8000-00AA006D2EA
4}\InprocServer32
HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{00000541-0000-0010-8000-00AA006D2EA
4}\InprocServer32
HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{00000514-0000-0010-8000-00AA006D2EA
4}\InprocServer32
HKEY_CLASSES_ROOT\Wow6432Node\TypeLib\{00000200-0000-0010-8000-00AA006D2
EA4}\2.0\0\win32
HKEY_CLASSES_ROOT\Wow6432Node\TypeLib\{00000201-0000-0010-8000-00AA006D2
EA4}\2.1\0\win32

the Default values had wrong values, starting with "C:\Program
files\Common
files\System..." but they must start from
"%CommonProgramFiles%\System..."
and "%CommonProgramFiles(x86)%\System..." if this is a Wow6432Node
subkey.
And also the type of the default values - it must be REG_EXPAND_SZ but
it was
REG_SZ.

One can download my fix here:
http://rapidshare.com/files/377678655/win7ADOFix.rar.html

*****************************************
The rapidshare link will probably expire at some point, so I gather you
just created a .reg file to fix these registry entries? If so, it's a
text file whose contents can also be posted here (It was several text
files which I combined - anyone wishing to use this can copy it to a
text file with a .reg extension, right-click it and choose merge. You
must be using Win7 and, of course, this is your registry we are talking
about modifying here - use this at your own risk and do make a backup of
your registry first!):

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\CLSID\{00000507-0000-0010-8000-00AA006D2EA4}\InprocSe
rver32]
@=hex(2):25,00,43,00,6f,00,6d,00,6d,00,6f,00,6e,00,50,00,72,00,6f,00,67,
00,72,\

00,61,00,6d,00,46,00,69,00,6c,00,65,00,73,00,25,00,5c,00,53,00,79,00,73,
00,\

74,00,65,00,6d,00,5c,00,61,00,64,00,6f,00,5c,00,6d,00,73,00,61,00,64,00,
6f,\
00,31,00,35,00,2e,00,64,00,6c,00,6c,00,00,00
"ThreadingModel"="Both"

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{00000541-0000-0010-8000-00AA006D2E
A4}\InprocServer32]
@=hex(2):25,00,43,00,6f,00,6d,00,6d,00,6f,00,6e,00,50,00,72,00,6f,00,67,
00,72,\

00,61,00,6d,00,46,00,69,00,6c,00,65,00,73,00,28,00,78,00,38,00,36,00,29,
00,\

25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,5c,00,61,00,64,00,6f,00,
5c,\

00,6d,00,73,00,61,00,64,00,6f,00,31,00,35,00,2e,00,64,00,6c,00,6c,00,00,
00
"ThreadingModel"="Both"

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Wow6432Node\TypeLib\{00000200-0000-0010-8000-00AA006D
2EA4}\2.0\0\win32]
@=hex(2):25,00,43,00,6f,00,6d,00,6d,00,6f,00,6e,00,50,00,72,00,6f,00,67,
00,72,\

00,61,00,6d,00,46,00,69,00,6c,00,65,00,73,00,25,00,5c,00,53,00,79,00,73,
00,\

74,00,65,00,6d,00,5c,00,61,00,64,00,6f,00,5c,00,6d,00,73,00,61,00,64,00,
6f,\
00,32,00,30,00,2e,00,74,00,6c,00,62,00,00,00

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Wow6432Node\TypeLib\{00000201-0000-0010-8000-00AA006D
2EA4}\2.1\0\win32]
@=hex(2):25,00,43,00,6f,00,6d,00,6d,00,6f,00,6e,00,50,00,72,00,6f,00,67,
00,72,\

00,61,00,6d,00,46,00,69,00,6c,00,65,00,73,00,25,00,5c,00,53,00,79,00,73,
00,\

74,00,65,00,6d,00,5c,00,61,00,64,00,6f,00,5c,00,6d,00,73,00,61,00,64,00,
6f,\
00,32,00,31,00,2e,00,74,00,6c,00,62,00,00,00

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\CLSID\{00000514-0000-0010-8000-00AA006D2EA4}\InprocSe
rver32]
@=hex(2):25,00,43,00,6f,00,6d,00,6d,00,6f,00,6e,00,50,00,72,00,6f,00,67,
00,72,\

00,61,00,6d,00,46,00,69,00,6c,00,65,00,73,00,25,00,5c,00,53,00,79,00,73,
00,\

74,00,65,00,6d,00,5c,00,41,00,44,00,4f,00,5c,00,6d,00,73,00,61,00,64,00,
6f,\
00,31,00,35,00,2e,00,64,00,6c,00,6c,00,00,00
"ThreadingModel"="Apartment"

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{00000514-0000-0010-8000-00AA006D2E
A4}\InprocServer32]
@=hex(2):25,00,43,00,6f,00,6d,00,6d,00,6f,00,6e,00,50,00,72,00,6f,00,67,
00,72,\

00,61,00,6d,00,46,00,69,00,6c,00,65,00,73,00,28,00,78,00,38,00,36,00,29,
00,\

25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,5c,00,61,00,64,00,6f,00,
5c,\

00,6d,00,73,00,61,00,64,00,6f,00,31,00,35,00,2e,00,64,00,6c,00,6c,00,00,
00
"ThreadingModel"="Both"

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\CLSID\{0000050B-0000-0010-8000-00AA006D2EA4}\InprocSe
rver32]
@=hex(2):25,00,43,00,6f,00,6d,00,6d,00,6f,00,6e,00,50,00,72,00,6f,00,67,
00,72,\

00,61,00,6d,00,46,00,69,00,6c,00,65,00,73,00,25,00,5c,00,53,00,79,00,73,
00,\

74,00,65,00,6d,00,5c,00,61,00,64,00,6f,00,5c,00,6d,00,73,00,61,00,64,00,
6f,\
00,31,00,35,00,2e,00,64,00,6c,00,6c,00,00,00
"ThreadingModel"="Both"

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\CLSID\{00000535-0000-0010-8000-00AA006D2EA4}\InprocSe
rver32]
@=hex(2):25,00,43,00,6f,00,6d,00,6d,00,6f,00,6e,00,50,00,72,00,6f,00,67,
00,72,\

00,61,00,6d,00,46,00,69,00,6c,00,65,00,73,00,25,00,5c,00,53,00,79,00,73,
00,\

74,00,65,00,6d,00,5c,00,61,00,64,00,6f,00,5c,00,6d,00,73,00,61,00,64,00,
6f,\
00,31,00,35,00,2e,00,64,00,6c,00,6c,00,00,00
"ThreadingModel"="Both"

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\CLSID\{00000541-0000-0010-8000-00AA006D2EA4}\InprocSe
rver32]
@=hex(2):25,00,43,00,6f,00,6d,00,6d,00,6f,00,6e,00,50,00,72,00,6f,00,67,
00,72,\

00,61,00,6d,00,46,00,69,00,6c,00,65,00,73,00,25,00,5c,00,53,00,79,00,73,
00,\

74,00,65,00,6d,00,5c,00,61,00,64,00,6f,00,5c,00,6d,00,73,00,61,00,64,00,
6f,\
00,31,00,35,00,2e,00,64,00,6c,00,6c,00,00,00
"ThreadingModel"="Both"

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\TypeLib\{00000200-0000-0010-8000-00AA006D2EA4}\2.0\0\
win32]
@=hex(2):25,00,43,00,6f,00,6d,00,6d,00,6f,00,6e,00,50,00,72,00,6f,00,67,
00,72,\

00,61,00,6d,00,46,00,69,00,6c,00,65,00,73,00,25,00,5c,00,53,00,79,00,73,
00,\

74,00,65,00,6d,00,5c,00,61,00,64,00,6f,00,5c,00,6d,00,73,00,61,00,64,00,
6f,\
00,32,00,30,00,2e,00,74,00,6c,00,62,00,00,00

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\TypeLib\{00000201-0000-0010-8000-00AA006D2EA4}\2.1\0\
win32]
@=hex(2):25,00,43,00,6f,00,6d,00,6d,00,6f,00,6e,00,50,00,72,00,6f,00,67,
00,72,\

00,61,00,6d,00,46,00,69,00,6c,00,65,00,73,00,25,00,5c,00,53,00,79,00,73,
00,\

74,00,65,00,6d,00,5c,00,61,00,64,00,6f,00,5c,00,6d,00,73,00,61,00,64,00,
6f,\
00,32,00,31,00,2e,00,74,00,6c,00,62,00,00,00

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{00000507-0000-0010-8000-00AA006D2E
A4}\InprocServer32]
@=hex(2):25,00,43,00,6f,00,6d,00,6d,00,6f,00,6e,00,50,00,72,00,6f,00,67,
00,72,\

00,61,00,6d,00,46,00,69,00,6c,00,65,00,73,00,28,00,78,00,38,00,36,00,29,
00,\

25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,5c,00,61,00,64,00,6f,00,
5c,\

00,6d,00,73,00,61,00,64,00,6f,00,31,00,35,00,2e,00,64,00,6c,00,6c,00,00,
00
"ThreadingModel"="Both"

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{0000050B-0000-0010-8000-00AA006D2E
A4}\InprocServer32]
@=hex(2):25,00,43,00,6f,00,6d,00,6d,00,6f,00,6e,00,50,00,72,00,6f,00,67,
00,72,\

00,61,00,6d,00,46,00,69,00,6c,00,65,00,73,00,28,00,78,00,38,00,36,00,29,
00,\

25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,5c,00,61,00,64,00,6f,00,
5c,\

00,6d,00,73,00,61,00,64,00,6f,00,31,00,35,00,2e,00,64,00,6c,00,6c,00,00,
00
"ThreadingModel"="Both"

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{00000535-0000-0010-8000-00AA006D2E
A4}\InprocServer32]
@=hex(2):25,00,43,00,6f,00,6d,00,6d,00,6f,00,6e,00,50,00,72,00,6f,00,67,
00,72,\

00,61,00,6d,00,46,00,69,00,6c,00,65,00,73,00,28,00,78,00,38,00,36,00,29,
00,\

25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,5c,00,61,00,64,00,6f,00,
5c,\

00,6d,00,73,00,61,00,64,00,6f,00,31,00,35,00,2e,00,64,00,6c,00,6c,00,00,
00
"ThreadingModel"="Both"


0 new messages