http://bugs.winehq.org/show_bug.cgi?id=58140
Bug ID: 58140 Summary: ODBC using unixodbc stopped working due to regression merge between 9.0 and 10.0 Product: Wine Version: 10.0 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: blocker Priority: P2 Component: odbc Assignee: wine-bugs@winehq.org Reporter: heiko.rabe+winehq@peopleware.com Distribution: ---
The following fix prevent proper usage of ODBC interface based on unixodbc provided DSN's:
https://gitlab.winehq.org/wine/wine/-/commit/85047505f342b6767b9f48cbcdae2b4...
I'm using an odbc.ini as follows located at `/etc/odbc.ini`
``` [test] Driver=PostgreSQL Unicode Description=PostgreSQL Data Source Servername=xyz.internal.com Port=5432 UserName=xyz Password=xyz_password Database=test SSLMode=prefer Debug=0 CommLog=0 ```
This leads to following wine registry entries in `system.reg` file:
``` [Software\ODBC\ODBC.INI\test] 1744806811 #time=1dbaecbc3836bb4 "Driver"="PostgreSQL Unicode"
[Software\ODBC\ODBCINST.INI\ODBC Drivers] 1744806811 #time=1dbaecbc3834d1e "PostgreSQL ANSI"="Installed" "PostgreSQL Unicode"="Installed" ```
Testing it with `isql` tool on linux the connect is successful and i can select data from database:
``` isql test +---------------------------------------+ | Connected! | | | | sql-statement | | help [tablename] | | quit | | | +---------------------------------------+ SQL> ```
The Windows application using a driverconnect with connect string "DSN=test".
Unfortunately the fix linked above searches the driver key now on a complete different registry key and tries only to open it from there. Versions previous to 10.0 are using the registry keys shown above and are working, version 10.0 now tries only:
``` [Software\ODBC\ODBC.INI\ODBC Data Sources] 1744806811 #time=1dbaecbc3836bb4 ```
which is not present, will be created by requesting the driver and fails, cause the driver key can only be found on the above shown reg key, that 9.0 correctly supports.
This stops working with ODBC based on unixodbc in version 10.0 and higher now. To me it's not clears, what problem the fix linked above should address. My guess would be, that one of following relates to the problem: - ODBC supports user and system DNS (system DNS seems now not longer be valid) - Wine runtime doesn't create the correct registry entries on 'wineboot' (leads to failing fix) - overlooked to support unixodbc at all and only tested with Microsoft ODBC drivers only.