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!
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
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
Has anyone found a solution for that?
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
Thank you.
--
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"
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
Thank you,
Sergey L.
PS That was not MS Office 2010 for me as occurred.
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"