ODBC implementation, ADO not working (repost)

Ask your support questions in here

Moderator: Moderator Team

User avatar
andreissoft
Posts: 16
Joined: Wed Apr 23, 2014 9:31 pm

ODBC implementation, ADO not working (repost)

Post by andreissoft »

Hello everybody.

A while ago i posted a topic regarding three problems encountered in ReactOS. One of them was the infamous ODBC.
After some research, i managed to get ODBC working on ReactOS by copying specific files from Windows XP. Still, there's another problem.
ADO (ActiveX Data Objects) is not working... Did some research, found that ADO resides in \Program Files\Common Files\System\ADO...

So, i copied the files from a working WIN XP SP3 install to ROS and, not knowing what's what started regsvr32-ing as many DLL's as i found :)

Some progress has been made. The application that uses ADO changed the error message from "ActiveX Component Can't Create Object" to
"Automation Error -2147221166". I got stuck at this point - ADO appears to be registered but does not start up :( Googling this did not produce
any results, it appears some ADO dll is missing and nobody knows about it :)

From what i know (HBelusca on JIRA confirmed this) the MDAC installer (the thing that drops ADO onto the system) will only work on : Windows '98 !
That's why i got my app. working on Wine, because Wine could launch MDAC_TYP.exe and fool it so that i saw the operaing medium as Windows '98.
Once the MDAC installer saw it ran on Windows '98, it installed ADO and all the necessary stuff correctly.
The problem is that using the installers don't work on Win2k3 (or ROS) because on those OSes ODBC/mdac must be installed already (since for win2k3 it is provided with the OS and not independently, as it was the case with Windows <= 2k ...) . Maybe with some app compat it would work ? I don't know. And on ReactOS we don't have AppCompat for now....
This seems to be the problem. Maybe, instead of focusing on getting ADO to run, we shift focus on tricking the installer it into dropping ADO onto the system...
I know AppCompat isn't available and i know it won't appear over night, but, Wine had some settings that allowed the applications to detect certain OS versions
as specified in the conf file... I wonder if this could have been inherited in ROS ?
vicmarcal
Test Team
Posts: 2733
Joined: Mon Jul 07, 2008 12:35 pm

Re: ODBC implementation, ADO not working (repost)

Post by vicmarcal »

Probably a Tweak can be created to modify the ReactOS reporting version in the registry.
However some apps and libraries doesnt use the "registry" trick but performs additional checks not related to registry (as checking for libraries in W98 which aren't present in WXP, and failing if the library is not found) and that would be pretty difficult to "fake" really.
Forever Winter
Posts: 131
Joined: Sun Oct 20, 2013 6:50 am

Re: ODBC implementation, ADO not working (repost)

Post by Forever Winter »

If you feel that a dll is missing, you may want to go to <windir>\inf and check mdac.inf.
If you realy want to execute mdac redistributable setup under ROS or XP or whatsoever, you can extract the content of mdac_typ.exe with 7zip or so and modify dasetup.ini.
When done, you can put it into a self-extracting archive again (IExpress should do the job) and execute it.
User avatar
andreissoft
Posts: 16
Joined: Wed Apr 23, 2014 9:31 pm

Re: ODBC implementation, ADO not working (repost)

Post by andreissoft »

This is a very good idea. I did know that 7zip can extract SFX cabs from MS, WinRar 3.71 which i currently use does not :( I'll give that MDAC Setup a try and keep you posted !
User avatar
andreissoft
Posts: 16
Joined: Wed Apr 23, 2014 9:31 pm

Re: ODBC implementation, ADO not working (repost)

Post by andreissoft »

Well... tried it. Had some interesting results...

I started with MDAC 2.0... no success whatsoever. The installer gets stuck, claiming the ADVPACK.DLL could not be accessed. I can only "retry" or cancel.
If i select "Custom setup" and skip some components (i really don't remembre which ones), the installer crashes claiming that the memory could not be read.

Good... let's try with MDAC 2.8. Found and modified dasetup.ini... the only problem is that, not knowing what components are missing in ROS, i modified the INI file to install all components. Ran the dasetup.exe and at some point it "Rolled back the installation"... sadly "Setup did not complete because of an error.". Then i saw SETUP.EXE and ran that. This time it installed... correctly. Wo-hoo...

Now, let's load the app and see what it does ! Well... no more "ActiveX component can't create object" errors, no more "Automation error". The application just exits, without any message or error. I have strong reason to believe that ADO is still the main culprit as the app loads the splash screen, reads settings and even warns about the low screen resolution (i run ROS in 800x600). After this, it attempts to open a MDB database. Before it used to fail with an error, now it just exits. Silently :)

It seems that ADO has all sorts of dependencies... probably undocumented :((
PS: Here are the files i played with...

http://www.suprasoft.ro/clienti/mdac_ros2.exe (MDAC 2.8 Redist from MS website, modified for ROS)
http://www.suprasoft.ro/clienti/mdac_ros.exe (MDAC 2.0 Redist installer from old setup kits. SETUP.EXE does not run in ROS - BAD_EXE Error - probably 16 bit, use acmsetup.exe /t mdac_typ.stf to start the installer)
http://www.suprasoft.ro/clienti/ado_ros.exe (ADO Redist from VB6, has some batch files, does not work in ROS)

These are all WinRAR SFX Archives which extract to subfolders.

PS2: I just thought of restarting ROS in the VM... after all this fiddling around with MDAC, ROS won't start anymore, i get a BSOD. Sometimes it starts up, though... cannot determine what exactly makes it start and what kills is. Strange...
oldman
Posts: 1179
Joined: Sun Dec 20, 2009 1:23 pm

Re: ODBC implementation, ADO not working (repost)

Post by oldman »

andreissoft » 12 May 2014 21:13
PS2: I just thought of restarting ROS in the VM... after all this fiddling around with MDAC, ROS won't start anymore, i get a BSOD. Sometimes it starts up, though... cannot determine what exactly makes it start and what kills is. Strange...
If after installing software, Ros boots to a bsod, then just do a fresh re-install, after all it only takes about 5 minutes and you are then running with a clean install.
Please keep the Windows classic 9x/2000 look and feel.
The layman's guides - debugging - bug reporting - compiling - ISO remaster.
They may help you with a problem, so do have a look at them.
User avatar
andreissoft
Posts: 16
Joined: Wed Apr 23, 2014 9:31 pm

Re: ODBC implementation, ADO not working (repost)

Post by andreissoft »

Of course i did :) I've reinstalled it quite a few times, since i often download the daily builds.

On the other hand, even with a clean, fresh install of ROS, after i manage to install ODBC and ADO with MDAC 2.8 (modified kit)
and then Microsoft JET 4.0 SP1. The application that uses ADO suddely exits with no message upon initiating the
connection to the MDB database :(

I get the ".LDB" file upon initiating the connection but... that's it. The app simply exits. I've mentioned it before, it works well
on Wine on quite a few Linux distros : Ubuntu, ZorinOS, lUbuntu and CentOS. It's quite difficult to trace the problem
but i shall do what i can to help !
User avatar
Black_Fox
Posts: 1584
Joined: Fri Feb 15, 2008 9:44 pm
Location: Czechia

Re: ODBC implementation, ADO not working (repost)

Post by Black_Fox »

app suddely exits with no message
This means that there is no information in debug log as well?
User avatar
EmuandCo
Developer
Posts: 4723
Joined: Sun Nov 28, 2004 7:52 pm
Location: Germany, Bavaria, Steinfeld
Contact:

Re: ODBC implementation, ADO not working (repost)

Post by EmuandCo »

Yeah, a log file would be nice.
ReactOS is still in alpha stage, meaning it is not feature-complete and is recommended only for evaluation and testing purposes.

If my post/reply offends or insults you, be sure that you know what sarcasm is...
User avatar
andreissoft
Posts: 16
Joined: Wed Apr 23, 2014 9:31 pm

Re: ODBC implementation, ADO not working (repost)

Post by andreissoft »

Black_Fox wrote:
app suddely exits with no message
This means that there is no information in debug log as well?
Nope :( The onlly thing i can do is install VB6 on ROS and run the uncompiled app, directly from source code. The line of code which will cause the error will provide sufficient information what goes wrong. I shall try and do this tonight...
User avatar
andreissoft
Posts: 16
Joined: Wed Apr 23, 2014 9:31 pm

Re: ODBC implementation, ADO not working (repost)

Post by andreissoft »

PS: Is there a way to access a network drive in ROS ? I cannot currently transfer files between my PC and ROS in the virtual machine, unless i upload to a HTTP server i own and dowload with Firefox in ROS. Can anything be done so i can transfer the 300 MB Visual Studio 6 installation kit to ROS ? I have a NAS which i could use, but i could not browse network drives with "\\ip-address\drive" specs in ROS :(
vicmarcal
Test Team
Posts: 2733
Joined: Mon Jul 07, 2008 12:35 pm

Re: ODBC implementation, ADO not working (repost)

Post by vicmarcal »

andreissoft wrote:Of course i did :) I've reinstalled it quite a few times, since i often download the daily builds.

On the other hand, even with a clean, fresh install of ROS, after i manage to install ODBC and ADO with MDAC 2.8 (modified kit)
and then Microsoft JET 4.0 SP1. The application that uses ADO suddely exits with no message upon initiating the
connection to the MDB database :(

I get the ".LDB" file upon initiating the connection but... that's it. The app simply exits. I've mentioned it before, it works well
on Wine on quite a few Linux distros : Ubuntu, ZorinOS, lUbuntu and CentOS. It's quite difficult to trace the problem
but i shall do what i can to help !
If the app simply exits, the best way is to attach Putty to obtain a debuglog through the serial port of the VM.
Then run ReactOS in Debug mode.
Then, before launching the app:
Press Tab+K, you will be breaking into the debugger
(If you didnt start ReactOS in Debug Mode you will watch a beautiful BSOD)
Then write in the VM the following: set condition * first always and hit enter.
Then look at the Putty window, you will see that the command is there (remember, the command must be written in the VM not in the terminal)
Go to the VM again, and just write cont and hit Enter
Now the screen is not frozen any more
And you can launch the app
You will see this time that instead dissapearing itself, now it will freeze the VM. Perfect. You caught it.
If you look at the Putty window you will see that the KDBG has just jumped.Write "bt" (in the Virtual Machine, not in Putty) and hit Enter.
Voila.
The (almost) perfect DebugLog.
vicmarcal
Test Team
Posts: 2733
Joined: Mon Jul 07, 2008 12:35 pm

Re: ODBC implementation, ADO not working (repost)

Post by vicmarcal »

andreissoft wrote:PS: Is there a way to access a network drive in ROS ? I cannot currently transfer files between my PC and ROS in the virtual machine, unless i upload to a HTTP server i own and dowload with Firefox in ROS. Can anything be done so i can transfer the 300 MB Visual Studio 6 installation kit to ROS ? I have a NAS which i could use, but i could not browse network drives with "\\ip-address\drive" specs in ROS :(
Yes. Much easier.
1)Create an .ISO with the contents, and plug it into the CD-ROM of the Virtual Machine

or

2)Create a virtual HDD with the contents and plug into the Virtual Machine.

My recomendation: The first one
User avatar
Black_Fox
Posts: 1584
Joined: Fri Feb 15, 2008 9:44 pm
Location: Czechia

Re: ODBC implementation, ADO not working (repost)

Post by Black_Fox »

andreissoft wrote:Can anything be done so i can transfer the 300 MB Visual Studio 6 installation kit to ROS ?
I, too, use an ISO. It is currently at around 6 GB and it contains everything I tested in the past. I just put it in the VM after ROS installation and don't need to worry afterwards :-)
mtzaldo
Posts: 1
Joined: Wed Jan 10, 2018 3:25 am

Re: ODBC implementation, ADO not working (repost)

Post by mtzaldo »

You can install MDAC_TYP.EXE silently in the console using:

mdac_typ /Q:A /C:"dasetup /Q"

More info:

https://msdn.microsoft.com/en-us/librar ... s.85).aspx
Post Reply

Who is online

Users browsing this forum: No registered users and 26 guests