C++/VB - VB6 + ADODB.Recordset + Vista = Automation error -2147024769
Asked By timm
10-Dec-08 03:34 AM

Hello everybody!
WEEKS have passed now and it won't come to an end.
The problem is simple:
I've got a VB6 program that runs wonderful under Windows XP but Vista always
hangs up, when it tries to execute the following command:
Set rs = New ADODB.Recordset <-- DOESN'T WORK!
This command exists inside a function, at the top of the .bas-File, the
Variable is declared:
Public rs As ADODB.Recordset
___________________________________
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
I've also tried to start with a new (clean) project and made everything as
simple as possible. It seems that no ADO-Components work under Windows Vista.
A try to get the ADODC-Control to work also failed (worked under XP, but not
under Vista).
___________________________________
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
I posted in several forums now, but nobody could help me.
Maybe the answers of others could, so I will link some of my Threads:
1) http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=4164774&SiteID=1
2)
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=4219413&SiteID=1&mode=1
3) http://www.vbarchiv.net/forum/id13_i16850t16850.html
4) http://www.dbforums.com/showthread.php?t=1635645
ADODB.Recordset
(1)
Windows XP
(1)
Windows Vista
(1)
Vista
(1)
ADODB
(1)
MDAC
(1)
VB
(1)
Database
(1)
timm replied...
I want to add the following: I am _NOT_ trying to connect to any database, I
just need the Recordset for a "List & Label"-Function!
Jan Hyde (VB MVP) replied...
timmi <timmi@>'s wild thoughts were
released on Wed, 10 Dec 2008 00:34:01 -0800 bearing the
following fruit:
I do this this all the time in all the products I work on
and have never encountered a problem with Vista.
It's seems to me it's more likely a problem with your
installation of ADO.
--
Jan Hyde (VB MVP)
https://mvp.support.microsoft.com/profile/Jan.Hyde
timm replied...
But I tested it on 3 Vista Systems now.
1 manual clean Installation (Business) and
2 different Laptop OEM Versions (Toshiba & Asus), which were pre-installed...
I haven't changed something, concerning the ADO-Installation (WDAC/MDAC).
Paul Clement replied...

¤ Hello everybody!
¤
¤ WEEKS have passed now and it won't come to an end.
¤
¤ The problem is simple:
¤
¤ I've got a VB6 program that runs wonderful under Windows XP but Vista always
¤ hangs up, when it tries to execute the following command:
¤
¤ Set rs = New ADODB.Recordset <-- DOESN'T WORK!
¤
¤ This command exists inside a function, at the top of the .bas-File, the
¤ Variable is declared:
¤
¤ Public rs As ADODB.Recordset
¤
¤ ___________________________________
¤ ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
¤ I've also tried to start with a new (clean) project and made everything as
¤ simple as possible. It seems that no ADO-Components work under Windows Vista.
¤
¤ A try to get the ADODC-Control to work also failed (worked under XP, but not
¤ under Vista).
Are you running this under the development environment in Vista or is it after your application has
been deployed to Vista?
I would make certain that you have distributed all of the necessary files with your application.
Sometimes missing libraries can cause strange exceptions to be generated. The error text that is
associated with this error number "The specified procedure could not be found" doesn't really make
sense in this context.
Paul
~~~~
Microsoft MVP (Visual Basic)
timm replied...
I think I can see a light at the end of the tunnel!
It seems that the Installation-Process of the Tool is the guilty part.
Before the installation, a simple ADODB.Recordset-Test was running, after
the installation, the -214... automation error of the same example pops up.
I think the Installshield-Setup installs/copies/registers his "own"
ADO-DLL's or something.
After an uninstall of the program, a runtime error 429 appears...
So, the installation "destroys" something, think we have to rebuild the setup!
Greets
timmi
timm replied...
In this case, it IS the problem, that "all of the necessary files" were
distributed with this application.
See my post above. Thanks for your hint! :-)
Richard Mueller [MVP] replied...
I also code VB apps using ADO all the time and never have problems with
Vista. However, when you install anything on Vista, it must be Vista aware
or it most likely will fail. I had to upgrade InstallShield to a version
that recognizes Vista. When I install with a setup program I try to always
use "Run as Administrator". On Vista it does not matter if you are logged in
as Administrator, you must use "Run as Administrator" (right click the *.exe
and select "Run as Administrator").
--
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--
Ralph replied...

up.
setup!
It may help to note that you can not and should not install any ADO, OLE DB,
or OLE components (MDAC) on a Vista machine. Vista comes with these
components already installed as the DAC v6.
Normally, an install will report an error or simply be ignore if it attempts
to do so. However, with Vista's "compatiblity mode" - Nevermind, I'll
restrain from inserting a personal opinion on this feature.
Remove all attempts to install these components from your install package.
You should include msadodc.ocx
Take a good look at the list of supported, shipped, and non-shipped
components given here:
http://msdn.microsoft.com/en-us/vbrun/ms788708.aspx
And modify your install accordingly.
While less practical for a Shrink-wrap package, I have found it useful to
place the "Supported Runtime Files to Distribute with Your Application" in
their own install and manage them separately when updating a new Vista box
within an enterprise, or friends and families environment. Simplifies
trouble-shooting.
-ralph
Problem with XP scheduler? C++ / VB I am having firefox 3.5.5 and 3.5.6 freeze my box when I update several tabs in a rapid succession on Win XP SP3. What happens is box totally freezes. Task manager -> Performance tab shows one of cores ctl-alt-del) and disk stops flashing every few seconds as it normally does under XP. Interestingly enough, it does not happen under Windows 7 on the same box no matter how hard I try. Some say it is a problem with crappy XP scheduler. Is there anything I can do under XP to fix this issue? Hardware: Asus M4A78 motherboard, Athlon 2, X4 620 CPU, 4 Gigs of DDR2 ram by Team Extreme. Running on Windows XP SP3. - - Programmer's Goldmine collections: http: / / preciseinfo.org Win32 Kernel Discussions Windows NT 3.51
Microsoft Windows Vista includes a two-way firewall. TO THE TOP C++ / VB Some of us want to info doesn't work since there is nowhere to make such a change in the Windows Firewall window that comes up. Configure it - HOW? Can someone explain how it's configured a good free easy to use two-way FireWall like ZoneAlarm that's compatible with Vista? Thanks. http: / / www.vistastic.com / 2007 / 03 / 09 / windows-firewall-enable-outbound-filtering / I bet you didn't know that Microsoft Windows Vista includes a two-way firewall. Unfortunately, the outbound filtering has been disabled. I'm not to Microsoft not wanting to frustrate customers when their internet dependent applications suddenly stopped working. Windows Vista Firewall: How To Turn On Outbound Filtering * Click the Start Button (Windows Orb) * In
MSVCRT differnet in Vista C++ / VB I am upgrading to Vista but still support some VB6 application. If I Package (Visual Studio package and deploy) my applications in XP they work across 2000, XP, Vista and 7. But if I Package them under Vista I get an "unable to find entry point " in the MSVCRT.dll when installing on 2000 or XP machines. Under windows 2000 and XP it appears this DLL only had handlers 1 and 2 but in
Slow text IO on 32 bit Windows 7 C++ / VB We have a customer reporting that our product draws text slowly on Windows 7. Upon further investigation, it appears as if 32 bit Windows 7 itself draws text slowly. I wrote a test program that uses printf to write 5000 times and it seems to run 2 to 9 times slower on 32 bit Windows 7 than on 64 bit Windows XP. (I am testing those systems using Vmware running on 64 bit Windows XP.) The performance on native 64 bit Windows 7 seems fine. Our product uses the standard
accessed to SQL Server (eg. SQL Server Management Studio). This application was running normally in Windows XP. However, error occurs in Vista. Now, it has avoided by [XPSP2 Compatibility] reluctantly. . . I think that MDAC of Vista (2008) will be a criminal, maybe. (Naturally, SP and KB of test environment are the newest.) Tahnks. '- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - Public g_AdoConn As ADODB.Connection Public Type tagFooTable I00 As String I01 As String I02 As String I03 As Open_AdoConnection Do ReadFooTable Loop ' Close_AdoConnection End Sub '- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - Public Function ReadFooTable() As Long Dim rs As ADODB.Recordset Erase g_FooRecords g_FooRecordsCount = 0 Set rs = ADOExecute("SELECT * FROM FOO") Do While rs.EOF = False Loop rs.Close ReadFooTable = g_FooRecordsCount End Function '- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - Public Function ADOExecute(ByVal strQuery As String) As ADODB.Recordset Dim rec As New ADODB.Recordset Set rec = g_AdoConn.Execute(strQuery) Set ADOExecute = rec