Building QT with "windeployqt": not connect to database (ODBC)
-
Hi and welcome to devnet,
Did you check that you also deployed the connector's dll and its dependencies along with your application ?
-
-
Use a tool like Dependency Walker to find the direct dependencies you need to deploy.
-
-
This is for your application executable, you should check the database plugin.
-
Mmh so I don't have to open my exe in dependency walker?
Sorry and thank you for your patience... -
C:\Qt\5.14.2\mingw73_32\plugins\sqldrivers\qsqlodbc.dll
I have to run dependency walker on it, right? -
Eventually, this is the output:
These are already present:
- LIBGCC_S_DW2-1.DLL
- LIBSTDC++-6.DLL
- QT5CORE.DLL
- QT5SQL.DLL
I downloaded the other 3 [https://www.dll-files.com/search.dll.html], and added these in the same folder.
-
And the ODBC dll ?
-
ODBC32.dll, no?
-
Yes, did you check the dependencies of that one ?
-
-
Unfortunately the problem persists
-
Hi, just guessing, are you using 127.0.0.1 (or localhost) to connect to the database also on the new PC? Also, have you checked that you can reach the database with MySQL workbench?
-
Yes to both
-
Ok. Is it same version of Windows 10 on both computers?
-
Is the ODCB connection created on 2nd computer? Also with mysql connector you need Visual C++2015 distro.
--James
-
@hskoglund Yes
-
Sorry what I meant was did you configure the ODBC data source on the 2nd computer.
Like this:
--James
11/24