https://bugs.winehq.org/show_bug.cgi?id=50150
Bug ID: 50150 Summary: ODBC applications fail to create DSNs due to 'odbccp32.SQLWriteDSNToIni' stub Product: Wine Version: 5.21 Hardware: x86-64 OS: Linux Status: NEW Severity: normal Priority: P2 Component: odbc Assignee: wine-bugs@winehq.org Reporter: focht@gmx.net Distribution: ---
Hello folks,
continuation of bug 50116
Download:
https://web.archive.org/web/20160419173100/http://www.kbld.de/fileadmin/defa...
Prerequisites:
* 32-bit WINEPREFIX (WINEARCH=win32) for 'jet40' recipe * 'winetricks -q jet40' * MS Access 2000 runtime from http://download.microsoft.com/download/office2000dev/art2kmin/1/win98/en-us/... -> 'winetricks -q art2kmin' can't be used here (https://github.com/Winetricks/winetricks/issues/1641) (after unpacking, ART2KMin installer needs to be run with 'wine Setup.exe INSTALLPFILES=1 /wait')
Content of 'MakeDSN.ini'
--- snip --- [shoai_access] ; die folgenden Einträge sollten immer da sein Driver=Microsoft Access Driver (*.mdb) DSNType=System DSN=shoai13 DESCRIPTION=S-HOAI 13.0 Access DBQ=C:\KOBOLD\shoai.13\data\kobold13.mdb FIL=MS Access; --- snip ---
Re-running the admin tool after installation:
--- snip --- $ pwd /home/focht/.wine/drive_c/KOBOLD/shoai.13/admin/client-installation/tools/makedsn
$ WINEDEBUG=+seh,+relay,+loaddll,+odbc wine ./makedsn.exe >>log.txt 2>&1 ... 00fc:trace:loaddll:build_module Loaded L"C:\windows\system32\ODBCCP32.DLL" at 00990000: builtin 00fc:Call PE DLL (proc=00996380,module=00990000 L"ODBCCP32.DLL",reason=WINE_PREATTACH,res=00000000) 00fc:Ret PE DLL (proc=00996380,module=00990000 L"ODBCCP32.DLL",reason=WINE_PREATTACH,res=00000000) retval=1 ... 00fc:Call odbccp32.SQLConfigDataSource(00000000,00000004,00ebd464 "Microsoft Access Driver (*.mdb)",00ebd54c "DSN=shoai13") ret=00465612 ... 00fc:trace:odbc:SQLConfigDataSource "DSN=shoai13" ... 00fc:trace:odbc:SQLConfigDataSource "DESCRIPTION=S-HOAI 13.0 Access" ... 00fc:trace:odbc:SQLConfigDataSource "DBQ=C:\KOBOLD\shoai.13\data\kobold13.mdb" ... 00fc:trace:odbc:SQLConfigDataSource "FIL=MS Access;" ... 00fc:Call advapi32.RegOpenKeyW(80000002,009976d0 L"Software\ODBC\ODBCINST.INI\",0031fdc0) ret=00991c05 ... 00fc:Ret advapi32.RegOpenKeyW() retval=00000000 ret=00991c05 00fc:Call advapi32.RegOpenKeyW(00000090,00191ef8 L"Microsoft Access Driver (*.mdb)",0031fdc4) ret=00991c1d ... 00fc:Ret advapi32.RegOpenKeyW() retval=00000000 ret=00991c1d 00fc:Call advapi32.RegGetValueW(00000094,00000000,0099a028 L"driver",00000002,0031fdbc,00000000,0031fdb8) ret=00991c94 0 ... 00fc:Ret advapi32.RegGetValueW() retval=00000000 ret=00991cde ... 00fc:Call KERNEL32.LoadLibraryW(00191f40 L"C:\windows\system32\ODBCJT32.DLL") ret=00991cf3 ... 00fc:Ret KERNEL32.LoadLibraryW() retval=010b0000 ret=00991cf3 ... 00fc:Call KERNEL32.GetProcAddress(010b0000,00997194 "ConfigDSN") ret=00991f52 00fc:Ret KERNEL32.GetProcAddress() retval=010bb595 ret=00991f52 00fc:trace:odbc:SQLConfigDataSource Calling ConfigDSN ... 00fc:Call msvcrt.wcslen(01250f28 L"DSN=shoai13;DESCRIPTION=S-HOAI 13.0 Access;DBQ=C:\KOBOLD\shoai.13\data\kobold13.mdb;FIL=MS Access;;") ret=010bae8d 00fc:Ret msvcrt.wcslen() retval=00000063 ret=010bae8d ... 00fc:Call odbccp32.SQLGetPrivateProfileString(01254a98 "ODBC Data Sources",01254ac8 "shoai13",01254ae8 "",0031f2d4,0000012b,01254b00 "odbc.ini") ret=010dc59e 00fc:trace:odbc:SQLGetPrivateProfileString "ODBC Data Sources" "shoai13" "" 0031F2D4 299 "odbc.ini" ... 00fc:Call advapi32.RegOpenKeyW(80000001,00997950 L"Software\ODBC",0031e33c) ret=00993100 ... 00fc:Ret advapi32.RegOpenKeyW() retval=00000000 ret=00993100 00fc:Call advapi32.RegOpenKeyW(000000a0,00191f70 L"odbc.ini",0031e340) ret=00993113 ... 00fc:Ret advapi32.RegOpenKeyW() retval=00000000 ret=00993113 ... 00fc:Call advapi32.RegOpenKeyW(000000a4,00191f40 L"ODBC Data Sources",0031e338) ret=0099312e ... 00fc:Ret advapi32.RegOpenKeyW() retval=00000002 ret=0099312e ... 00fc:Ret odbccp32.SQLGetPrivateProfileString() retval=00000000 ret=010dc59e ... 00fc:Call advapi32.RegOpenKeyExW(80000001,0031e0f8 L"SOFTWARE\ODBC\ODBC.INI\shoai13\Engines\Jet",00000000,00020019,0125111c) ret=010dcd1f ... 00fc:Ret advapi32.RegOpenKeyExW() retval=00000002 ret=010dcd1f ... 00fc:Call odbccp32.SQLGetPrivateProfileString(01254b10 "ODBC Data Sources",01254b40 "shoai13",01254b60 "",0031f2d4,0000012b,01254b78 "odbc.ini") ret=010dc59e 00fc:trace:odbc:SQLGetPrivateProfileString "ODBC Data Sources" "shoai13" "" 0031F2D4 299 "odbc.ini" ... 00fc:Call advapi32.RegOpenKeyW(80000001,00997950 L"Software\ODBC",0031e33c) ret=00993100 ... 00fc:Ret advapi32.RegOpenKeyW() retval=00000000 ret=00993100 00fc:Call advapi32.RegOpenKeyW(000000a0,00191f70 L"odbc.ini",0031e340) ret=00993113 ... 00fc:Ret advapi32.RegOpenKeyW() retval=00000000 ret=00993113 ... 00fc:Call advapi32.RegOpenKeyW(000000a4,00191f40 L"ODBC Data Sources",0031e338) ret=0099312e ... 00fc:Ret advapi32.RegOpenKeyW() retval=00000002 ret=0099312e ... 00fc:Ret odbccp32.SQLGetPrivateProfileString() retval=00000000 ret=010dc59e ... 00fc:Call KERNEL32.GetProcAddress(00990000,010b4ae8 "SQLWriteDSNToIni") ret=010dc6a1 00fc:Ret KERNEL32.GetProcAddress() retval=0099116c ret=010dc6a1 00fc:Call odbccp32.SQLWriteDSNToIni(0031e550 "shoai13",0031e938 "Microsoft Access Driver (*.mdb)") ret=010dc557 00fc:fixme:odbc:SQLWriteDSNToIni "shoai13" "Microsoft Access Driver (*.mdb)" 00fc:Ret odbccp32.SQLWriteDSNToIni() retval=00000001 ret=010dc557 00fc:Call advapi32.RegOpenKeyExW(80000001,0031e2e4 L"SOFTWARE\ODBC\ODBC.INI\shoai13",00000000,0002001f,0031e500) ret=010dcd1f ... 00fc:Ret advapi32.RegOpenKeyExW() retval=00000002 ret=010dcd1f 00fc:Call advapi32.RegOpenKeyExW(80000002,0031e2e4 L"SOFTWARE\ODBC\ODBC.INI\shoai13",00000000,0002001f,0031e500) ret=010dcd1f ... 00fc:Ret advapi32.RegOpenKeyExW() retval=00000002 ret=010dcd1f ... 00fc:Ret odbccp32.SQLConfigDataSource() retval=00000000 ret=00465612 ... 00fc:Call user32.MessageBoxA(00010098,00eb51a4 "Folgende DSN konnte(n) nicht angelegt werden:\rshoai_access\r\n",00465108 "Fehler",00040010) ret=00465047 --- snip ---
Microsoft docs 'SQLWriteDSNToIni':
https://docs.microsoft.com/en-us/sql/odbc/reference/syntax/sqlwritedsntoini-...
Wine source:
https://source.winehq.org/git/wine.git/blob/764a93f121c6b0f88c3444454ebb85eb...
--- snip --- 1665 BOOL WINAPI SQLWriteDSNToIniW(LPCWSTR lpszDSN, LPCWSTR lpszDriver) 1666 { 1667 clear_errors(); 1668 FIXME("%s %s\n", debugstr_w(lpszDSN), debugstr_w(lpszDriver)); 1669 return TRUE; 1670 } 1671 1672 BOOL WINAPI SQLWriteDSNToIni(LPCSTR lpszDSN, LPCSTR lpszDriver) 1673 { 1674 clear_errors(); 1675 FIXME("%s %s\n", debugstr_a(lpszDSN), debugstr_a(lpszDriver)); 1676 return TRUE; 1677 } --- snip ---
$ sha1sum shoai13-kompakt.exe ee726de4309c6667c458296c4530102254fc7a20 shoai13-kompakt.exe
$ du -sh shoai13-kompakt.exe 38M shoai13-kompakt.exe
$ sha1sum art2kmin.exe 73be2622254d1f857a204a03f068787542b985e9 art2kmin.exe
$ du -sh art2kmin.exe 33M art2kmin.exe
$ wine --version wine-5.21-152-gcf49617c1a3
Regards
https://bugs.winehq.org/show_bug.cgi?id=50150
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- URL| |https://web.archive.org/web | |/20160419173100/http://www. | |kbld.de/fileadmin/default/d | |ownloads/testversionen/shoa | |i13-kompakt.exe Keywords| |download
https://bugs.winehq.org/show_bug.cgi?id=50150
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |STAGED Staged patchset| |https://github.com/wine-sta | |ging/wine-staging/tree/mast | |er/patches/odbccp32-SQLWrit | |eDSNToIni CC| |leslie_alistair@hotmail.com
https://bugs.winehq.org/show_bug.cgi?id=50150
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|STAGED |RESOLVED Resolution|--- |FIXED Fixed by SHA1| |ea3096bdab8fb865f63496613d1 | |db09a105330dc
--- Comment #1 from Anastasius Focht focht@gmx.net --- Hello folks,
this is fixed by commit https://source.winehq.org/git/wine.git/commitdiff/ea3096bdab8fb865f63496613d... ("odbccp32: Implement SQLWriteDSNToIni/W.").
Thanks Alistair
--- snip -- $ pwd /home/focht/.wine/drive_c/KOBOLD/shoai.13/admin/client-installation/tools/makedsn
$ WINEDEBUG=+seh,+relay,+loaddll,+odbc wine ./makedsn.exe >>log.txt 2>&1 ... 00fc:trace:odbc:SQLConfigDataSource Calling ConfigDSN ... 00fc:Call odbccp32.SQLWriteDSNToIni(0032e540 "shoai13",0032e928 "Microsoft Access Driver (*.mdb)") ret=011ac557 00fc:trace:odbc:SQLWriteDSNToIni "shoai13" "Microsoft Access Driver (*.mdb)" 00fc:Call KERNEL32.MultiByteToWideChar(00000000,00000000,0032e540 "shoai13",ffffffff,00000000,00000000) ret=00a65a35 ... 00fc:Ret KERNEL32.MultiByteToWideChar() retval=00000008 ret=00a65a35 ... 00fc:Call KERNEL32.MultiByteToWideChar(00000000,00000000,0032e540 "shoai13",ffffffff,00198318,00000008) ret=00a65a65 ... 00fc:Ret KERNEL32.MultiByteToWideChar() retval=00000008 ret=00a65a65 00fc:Call KERNEL32.MultiByteToWideChar(00000000,00000000,0032e928 "Microsoft Access Driver (*.mdb)",ffffffff,00000000,00000000) ret=00a65a7a ... 00fc:Ret KERNEL32.MultiByteToWideChar() retval=00000020 ret=00a65a7a ... 00fc:Call KERNEL32.MultiByteToWideChar(00000000,00000000,0032e928 "Microsoft Access Driver (*.mdb)",ffffffff,001998e0,00000020) ret=00a65aa7 ... 00fc:trace:odbc:SQLWriteDSNToIniW L"shoai13" L"Microsoft Access Driver (*.mdb)" 00fc:trace:odbc:SQLValidDSNW L"shoai13" ... 00fc:Ret odbccp32.SQLWriteDSNToIni() retval=00000001 ret=011ac557 ... 00fc:Ret odbccp32.SQLConfigDataSource() retval=00000001 ret=00465612 ... --- snip ---
Registry export to show the registered DSN:
--- snip --- Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\Software\ODBC\ODBC.INI\shoai13] "DBQ"="C:\KOBOLD\shoai.13\data\kobold13.mdb" "Description"="S-HOAI 13.0 Access" "driver"="C:\windows\system32\ODBCJT32.DLL" "DriverId"=dword:00000019 "FIL"="MS Access" "SafeTransactions"=dword:00000000 "UID"=""
[HKEY_LOCAL_MACHINE\Software\ODBC\ODBC.INI\shoai13\Engines]
[HKEY_LOCAL_MACHINE\Software\ODBC\ODBC.INI\shoai13\Engines\Jet] "ImplicitCommitSync"="" "Threads"=dword:00000003 "UserCommitSync"="Yes" --- snip ---
$ wine --version wine-6.2-157-gb8719736c5a
Regards
https://bugs.winehq.org/show_bug.cgi?id=50150
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #2 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 6.3.
https://bugs.winehq.org/show_bug.cgi?id=50150
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |6.0.x
https://bugs.winehq.org/show_bug.cgi?id=50150
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|6.0.x |---
--- Comment #3 from Michael Stefaniuc mstefani@winehq.org --- Removing the 6.0.x milestone from bug fixes included in 6.0.1.