Important: Please read the Qt Code of Conduct -

32-bit MS Access and 64-bit Qt ODBC driver

  • I have two versions of qt installed on my computer; one is 32-bit and the other is 64-bit. And use MSVC2010 as compiler.
    At first, I created a project/app in 32-bit to connect to MS Access, which is also 32-bit. Everything worked fine until I changed the program to be built with Qt 64-bit libraries. My program cannot connect to MS Access anymore. It said "Cannot open the database".

    After reading through several discussions, it seems to be a conflict between my ODBC driver which is 64-bit and MS Access which is 32-bit. But I still could not find a solution. Does anyone have the same problem or know any ways to work around this problem?? I really need to use both 64-bit qt libraries with 32-bit MS Access.

    My connection string is @Driver={Microsoft Access Driver (*.mdb, *.accdb)};DSN='';DBQ=.\xxxx.accdb@

  • You need to verify in both ODBC 32bits and ODBC 64bits, if MSAccess Driver is available.


    C:\Windows\System32\odbcad32.exe (64bits)
    C:\Windows\SysWOW64\odbcad32.exe (32bits)

  • Hi TioRoy. Thanks for the reply.

    There is "MS Access Database" under User DSN in both odbcad32s. However the one in System32 gives me an error when I clicked "Configure". It said "The setup routines for the Microsoft Access Driver (*.mdb, *.accdb) ODBC driver could not be found. Please reinstall driver." "Errors Found: The specified DSN contains an architecture mismatch between the Driver and Application".

    Does this mean I have to install the ODBC 64-bit driver and will this work with 32-bit MS Access currently installed on my computer??

  • Generally, the files (DLL's) resides in different paths (system32 and syswow64), and the registry is different too.

    But I don't know what's happen with Office.

    check "this link":

    Copied from docx

    64-bit VBA Issues
    When 64-bit Office is installed on a machine, the user is required to uninstall any 32-bit versions of Office applications, including prior versions. 32-bit versions can be installed after 64-bit is installed, but Microsoft has not thoroughly tested these scenarios. The best practice is to run any 64-bit Office instance on a machine dedicated to that version only.

  • I do have odbcad.dll in both folders but the issue still exists. Is there a way to connect a 32-bit Access to a 64-bit Qt program??

  • I think the problem is not with mdb file but with the driver. To open an Access database with a 64bit application you need a 64bit ODBC driver working properly.

    Odbcad is not the Access driver but an odbc dll only.

Log in to reply