Unsolved QODBC deployment
-
I compile my QT Project under Windows. That deals with database MDB by mean of ODBC using drivers QODBC. I put resultive exe-file to other Windows. When I run it, it dosn't find QODBC or any other drivers and don't open Datadase.
All used qt dll-s, used by project, including of course Qt5Sql.dll, are already put into one directory with exe-module. And such an approach solved privious problems with deployment.
Microsoft Access is installed on aim computer and opens mdb-files correctly.
What I must install more on new windows to make my program work correctly?!
9e6d8ec5-06aa-467d-a491-c3b8b7baa311-image.png -
Hi, you also need to copy the subdirectory sqldrivers from the Qt plugins. Inside that directory only qsqlodbc.dll needs to be present.
-
Hi,
In addition to what @hskoglund, you can use windeployqt to help create all what's necessary for your application to run.
-
Some important addition: I tried to act "from opposite". I found all examples of qsqlodbc.dll on my developers platform, rename and even replaced them all. To my wonder, my program remained working correctly. If not qsqlodbc.dll, what can contain needed drivers?
-
If you rename qsqlodbc.dll to something else like banana.jpg, Qt doesn't care, it loads all files regardless of what names they have in the subdirectory sqldrivers. You have to remove all files from that subdirectory.
Also sometimes ODBC can trip you up with you supplying having a 64-bit driver for a 32-bit WIndows installation. Make sure you compile your program with a 32-bit compiler kit.