Using unixODBC with wine

The people who are working on wine, some time ago added support for ODBC. This is done via a ODBC.DLL in the wine code that directs the calls out of the emulation environment, and to libodbc.so in the *nix world. This works nicely with unixODBC, and I have used it with various apps. One thing that has been reported to me by Bill Medland, who has been using Crystal Reports on Linux under wine, may be of help to others.

To quote Bill...

When Crystal Reports is run under WINE (at least under our application) and is supposed to use ODBC it complains that the connection string is invalid. (The error message is "Unable to connect: Incorrect log on parameters").

This is caused by Crystal Reports going off to the Windows Registry to look up the Driver setting for the DSN in the ODBC.INI portion of the registry. Since the driver setting is in the Linux file system, not the registry, it fails.

The fix is to add the entry into the registry. The setting can go either in the HKEY_CURRENT_USER or HKEY_LOCAL_MACHINE trees, as follows: Software->ODBC->ODBC.INI-><MYDSN>->Driver="not blank" where <MYDSN> is the appropriate DSN. The setting for the driver doesn't seem to matter, except that it must not be blank.