Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. problem ODBC driver Microsoft Access

problem ODBC driver Microsoft Access

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 1.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Nio74N Offline
    Nio74N Offline
    Nio74
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • Kent-DorfmanK Offline
      Kent-DorfmanK Offline
      Kent-Dorfman
      wrote on last edited by
      #2

      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.

      If you meet the AI on the road, kill it.

      Nio74N 1 Reply Last reply
      1
      • Kent-DorfmanK Offline
        Kent-DorfmanK Offline
        Kent-Dorfman
        wrote on last edited by
        #3

        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!

        If you meet the AI on the road, kill it.

        1 Reply Last reply
        1
        • Kent-DorfmanK Kent-Dorfman

          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.

          Nio74N Offline
          Nio74N Offline
          Nio74
          wrote on last edited by
          #4

          @Kent-Dorfman

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

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved