WineHQ
Wine Forums

Board index » WineHQ » Wine Help » Linux




 Page 1 of 1 [ 1 post ] 



 
Author Message
 Post Posted: Fri Nov 30, 2018 11:24 am 
Offline
Newbie
Newbie

Joined: Fri Nov 30, 2018 11:14 am
Posts: 3
Hello

Tried wine-2.9, wine-3.0 and wine-staging-3.18

About a year ago I got my VB6 program to connect to a local MariaDB server using mysql-connector-odbc-5.3.6-win32.msi in Linux using wine. Now when I try to do the same, it fails:
Quote:
Method '~' of object '~' failed


I wrote a minimal reproducible test case and I have great hopes that someone succeeds in getting the ADODB.Connection ".Open" call to succeed, and can steer me in the right direction.

Note: You do not need to have an actual MariaDB server running to test this. The challenge here is to get the "cn.Open" call to not fail with "Method '~' of object '~' failed". If whatever is causing this problem is solved, opening the connection if MariaDB is not running will fail with "[MySQL][ODBC 5.3(w) Driver]Can't connect to MySQL server on 'localhost' (10061)" which would be a tremendous success.

Step 1: Download winetricks:
Code:
wget  https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
chmod +x winetricks


Step 2: Download MySQL Connector ODBC:
https://downloads.mysql.com/archives/ge ... -win32.msi

Step 3: Set up a wine prefix:
Code:
WINEARCH="win32" WINEPREFIX="$HOME/wine-ado" ./winetricks vb6run mdac28
WINEARCH="win32" WINEPREFIX="$HOME/wine-ado" wine msiexec /i mysql-connector-odbc-5.3.6-win32.msi


Step 4: Verify that MySQL Connector ODBC is available:
Code:
WINEARCH="win32" WINEPREFIX="$HOME/wine-ado" wine control


See attached image "MySQL ODBC 5.3 Unicode Driver appears correctly".

Note that you do not have to create a new data source, it's enough that the MySQL ODBC 5.3 Unicode driver is visible there.
https://dev.mysql.com/doc/connector-odb ... t-dsn.html

Step 5: Download the source code/program:
https://filebin.net/vb1di59a65oxvsb1/ad ... t=icqv1naa
https://filebin.net/vb1di59a65oxvsb1/ad ... t=icqv1naa

I bundled two versions of the program; one uses late binding (Dim cn As Object), and the other uses early binding (Dim cn As ADODB.Connection) and as such has a reference to "Microsoft ActiveX Data Objects 2.8 Library" and the installer bundles MDAC_TYP.EXE

The zip files include compiled binaries, but you can compile yourself if you like.

Step 6: Run
Early-bound:
Code:
WINEARCH="win32" WINEPREFIX="$HOME/wine-ado" wine adotest_early/bin/adotest_early.exe

Late-bound:
Code:
WINEARCH="win32" WINEPREFIX="$HOME/wine-ado" wine adotest_late/bin/adotest_late.exe


Success would mean that you would either see the "OK" screen if your MariaDB server was up and running and your login credentials in the connection string were ok, or you would get a "Can't connect to MySQL server" popup if your server was not running.

See attached image "Success".

Failure would present itself as a "Method '~' of object '~' failed" popup.

See attached image "Failure".

I spent three days digging through the web, following dead links, dead ends and off-topic advice. I tried having the VB6 installer install MDAC_TYP.EXE, and having it not do that. I tried registering msado15.dll:
Code:
WINEARCH="win32" WINEPREFIX="$HOME/wine-ado" wine regsvr32 /i msado15.dll
regsvr32: Successfully registered DLL 'msado15.dll'
regsvr32: 'DllInstall' not implemented in DLL 'msado15.dll'


Let me know if you get lucky, or if you know of any workarounds.


Attachments:
File comment: Failure
fail.png
fail.png [ 16.42 KiB | Viewed 67 times ]
File comment: Success
ok.png
ok.png [ 4.66 KiB | Viewed 67 times ]
File comment: MySQL ODBC 5.3 Unicode Driver appears correctly
odbc.png
odbc.png [ 93.31 KiB | Viewed 67 times ]
Top 
Display posts from previous:  Sort by  
 
 Page 1 of 1 [ 1 post ] 




Board index » WineHQ » Wine Help » Linux


Who is online

Users browsing this forum: No registered users and 17 guests

 
 

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: