I'm running PostgreSQL server which I want to access from program under wine. I installed necessary wine software to be able to make ODBC connection.
But is it possible to access local PostgreSQL server from wine?
Or is my approach wrong, and there is perhaps better way?
2 Answers
This turned almost strait-forward. ODBC backend seems supported just for 32-bit wine prefix. So if running 64-bit Ubuntu, default prefix will be 64-bit, and these are necessary steps to install ODBC support:
create 32bit wine prefix (if it doesn't exist):
WINEPREFIX="/home/zetah/prefix32" WINEARCH='win32' wine 'wineboot'install necessary libraries:
WINEPREFIX="/home/zetah/prefix32" winetricks jet40 mdac28install the program that needs ODBC in this prefix
after downloading 32-bit ODBC driver from install it:
WINEPREFIX="/home/zetah/prefix32" wine msiexec /i psqlodbc.msi
After this accessing local PostgreSQL server should be possible inside wine program through ODBC.
The answer of zetah is alwys good, but there is a potential problem with some versions of winetrick that have for effect that the dialog box of odbcad32.exe is not displayed. The workaround is by setting 'odbccp32' to 'native,builtin' via 'winecfg'.