Visual Fox Pro 6 and psqlODBC on Ubuntu with Wine

Few days ago, the Systems Adminitrator from a Financial Institution in my city asked me to make their Financial Systems work in Ubuntu. Believe it or not, they have them in VFP6, using PostgreSQL as their DBMS.

You could think it’s easy and that we just have to install VFP6 using WINE and that’s it. But that’s not the procedure I took. First of all, I changed wine to have Windows 95 as the default one. Then, I installed a VFP6 runtime (with wine) found here (_vfp6r_setup.exe). And finally, I copied the VFP98 folder, found in the Visual Studio 6.0 CD, to $HOME/.wine/drive_c/Program Files/.

After verifying that VFP6 was running OK, I installed the PostgreSQL ODBC Windows Driver. For that, I downloaded the driver from the PostgreSQL Web Site and installed it with msiexec, since it’s a *.msi file and not and *.exe (ex. msiexec /i installer.msi).

Now, after installing the PostgreSQL driver I had to decide how to create and work with DSN’s (Like in Windows). To do that, I thought i had to mess with the wine registry, but i didn’t. What i did, was to install Microsoft Data Access Components (The one used in Windows XP). I downloaded it from MS’s website (It is only available for those who have an Original Windows Copy), and installed it with wine.

After having everything was installed, it was time to create the DSN so that the VFP6 app could connect to PostgreSQL Database found in a server. To do that, I tried to open odbcad32.exe found in $HOME/.wine/drive_c/windows/system32/, but it failed. It is because wine doesn’t support the MDAC (Windows XP one) I was using, so i had to override a couple of libraries. To do that, I changed odbc32 and odbccp32 libraries, in the wine configuration, to be Native (Windows) instead of being the wine defaults.

After having all that, I just created a new DSN and copied the VFP6 app to the Ubuntu Machine and it worked flawlessly.

2 Responses to “Visual Fox Pro 6 and psqlODBC on Ubuntu with Wine”

  1. Vadim P. Says:

    Very nice, thanks for helping them out.

  2. roaksoax Says:

    Btw, the Microsoft Data Access Components exe file is named MDAC_TYP.EXE, and i believe it’s version 5.50.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: