MDAC/ODBC 32bits

Questions about Wine on Linux
Locked
pcouderc
Level 2
Level 2
Posts: 13
Joined: Fri Apr 18, 2014 3:33 am

MDAC/ODBC 32bits

Post by pcouderc »

I have to use a 32bits windows application using MDAC/ODBC which accesses a postgresql server with unixodbc (on debian buster).

I have installed "winetrick mdac28" but I do not find the 32bits version of odbcad32.exe. I find :
.wine/drive_c/windows/syswow64/odbcad32.exe
but I do not find:
.wine/drive_c/windows/systrm32/odbcad32.exe

What do I miss ?
Is there a tutorial about that somewhere...?

Thanks for any help
PC
spoon0042
Level 6
Level 6
Posts: 572
Joined: Thu Dec 24, 2009 11:00 am

Re: MDAC/ODBC 32bits

Post by spoon0042 »

Believe it or not, syswow64 is the directory for 32-bit dlls. Anyway. Your winetricks is probably out of date since mdac doesn't really work on 64-bit. You'll probably want to create a 32-bit wineprefix for your app, then get an up-to-date winetricks, and go from there.

Also what wine version are you using? And if you can say what is the app and is it freely available?

e: One last thing, are you following some guide or instructions or was mdac28 a guess on your part?
pcouderc
Level 2
Level 2
Posts: 13
Joined: Fri Apr 18, 2014 3:33 am

Re: MDAC/ODBC 32bits

Post by pcouderc »

Thank you very much, I shall process as you indicate. But first I answer you.

I use wine 5.0.4 as indicated in apt-policy of my buster debian.

My app is a personal application developed on VC6 on XP years ago in a JET environment but with ODBC interface to postgresql on a debian server.
Then I did decide to switch (many years ago) to full debian desktop (with enlightenment), I did convert my XP to vmware first and qemu next.
And then I did use some apps directly with wine to avoid starting qemu. And it worked.
Now I had to reinstall full PC, and my apps are well except this one wich tries to access Postgresql...
No, I have not found a good guide and it is a reason of my question...

I am sorry that this app has no interest except for me ! In fact, I maintain a good old window VC6+FTN software in a... linux environment !
spoon0042
Level 6
Level 6
Posts: 572
Joined: Thu Dec 24, 2009 11:00 am

Re: MDAC/ODBC 32bits

Post by spoon0042 »

You may only need to install jet40 with winetricks as well if it's anything like other db apps. Hopefully that works for you.
fargodwe

Re: MDAC/ODBC 32bits

Post by fargodwe »

Just from the tremendous help I was given I'll also add that it may be necessary to also use winecfg on the prefix and manually add an entry for odbccp32.dll as native,builtin and be sure msado15 is shown as native,builtin as well - if not add an override for this as well. The installation of both of these does not take place via winetricks if the wine version is greater than 4.22.

I had to add mdac28 THEN jet40 in that order for my app to run. Then I had to do the above. I have Bob Wya and you spoon0042 to thank for that!!. Perhaps it might be needed in this case since it's 32-bit as well?
fargodwe

Re: MDAC/ODBC 32bits

Post by fargodwe »

A really dumb question but...are you sure postgresql is installed in your Debian installation? If not, I did find this on the net. Perhaps some of the console commands to check the status of postgresql might help.

Code: Select all

https://www.tecmint.com/install-postgresql-database-in-debian-10/
pcouderc
Level 2
Level 2
Posts: 13
Joined: Fri Apr 18, 2014 3:33 am

Re: MDAC/ODBC 32bits

Post by pcouderc »

Please excuse me to do not have answered before. I have been disturbed and I come back only now.

Thanks for all these fine and useful advises.

First I have successed to run an old 32 bits application application with Jet40 (=Access) db. I summarize here :

Code: Select all

sudo rm -rI .wine/
WINEARCH=win32 winecfg
winetricks mdac28
wine  .wine/drive_c/windows/system32/odbcad32.exe
winetricks jet40
wine  .wine/drive_c/windows/system32/odbcad32.exe
wine /mnt/MY_WIN_CD/setup.exe
wine .wine/drive_c/MY_install_directory/my_jet_app.exe
odbcad32.exe is not needed but allows to show ODBC available drivers.
The order mdac28 then jet40 seems important.

Now, I work on Postgresql interface with a tested environment and I shall report here...

@ spoon0042
I have not successed by using only jet40. I do not understand why...
I did try mdac28 because on old Windows, MDAC was installed separately, and I remind having soon seen that before...

@ fargodwe
MS ADO is not needed for my apps. So I did not install msado15, and I am not surprised it works anyway.
No, postgresql is not installed, and I do not intend to install it as my postgresql server is elsewere.
I am trying to use unixodbc with odbc-postgresql and

Code: Select all

apt-cache depends odbc-postgresql 
shows no dependency on postgresql-client. I suppose that maybe odbc-postgresql implements psql protocol directly on port 4321...

Not I try that...
pcouderc
Level 2
Level 2
Posts: 13
Joined: Fri Apr 18, 2014 3:33 am

Re: MDAC/ODBC 32bits

Post by pcouderc »

No problem with unixodbc : install it and test the dsn with isql, then set WINEDLLOVERRIDES with builtin version of odbc32.dll:

Code: Select all

isql my_dsn
WINEDLLOVERRIDES="odbc32=b" wine my_pgsql_app.exe
It can be too done in winecfg, but this way allows to switch native or builtin version of odbc32.dll at run time.
Locked