Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

problem ODBC driver Microsoft Access



  • Good after noon,

    I have check My ODCBdriver in the windows it are present,
    0_1551025371478_Annotazione 2019-02-24 172021.jpg

    this is my simple code for test

    db = QSqlDatabase::addDatabase("QODBC3");
        db.setDatabaseName("DRIVER={Microsoft Access Driver (*.mdb)};FIL={MS Access};DBQ=D:\\GoogleDrive\\Database2.mdb");
    
        if(!db.open())
            qDebug() <<db.lastError();
    

    but not work:

    QSqlError("0", "QODBC3: Unable to connect", "[Microsoft][Driver Manager ODBC] Nome origine dati non trovato e driver predefinito non specificato.")
    

    I tried all of them, I removed all the drivers, but I can not figure out where the error occurred

    My configurations:
    Windows 10 64 bit
    Qt 5.12.1
    plugins

    0_1551025882065_{27298B41-E8AE-4B7F-A171-B98602B0CBC8}.png.jpg



  • I exclusively use postgreSQL on Linux for my DB needs so I'm shooting in the dark, but I noticed that the MS ODBC driver is 32 bit. If you built Qt5.12 as a 64 bit framework then I'd expect that it won't connect.



  • Try CData Access Source instead. Also make sure to use the correct driver name. Your connection string is using the Driver field, not the Name field. Look for online examples!



  • @Kent-Dorfman

    thanks thanks you're right I had launched 64bit instead the database is 32bit


Log in to reply