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. QODBC does not work in 6.7.
Forum Updated to NodeBB v4.3 + New Features

QODBC does not work in 6.7.

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 4 Posters 686 Views
  • 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.
  • M Offline
    M Offline
    MartinGU
    wrote on last edited by
    #1

    Windows 10, Qt 6.7.0, MinGW.

    Added Qt 6.7.0 to my installation, 6.6.2 previous version.
    Just rebuilt code and tried to run.
    NO change in machine, Windows, code that is

    In 6.6.2 (and many versions before) code runs, works as it should
    In 6.7.0, database.open() does not work, fails to open database.
    "[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified, IM002|QODBC: Unable to connect|"

    I have seen the same error reported (for 6.7.0) in Stackoverflow (for MSSQL) but it was closed by a moderator that did not understand...

    /Martin

     database = QSqlDatabase::addDatabase("QODBC", sConnection);
     database.setDatabaseName("Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=" + sDsn);
     if (database.open())
       FAILS HERE
    
    Ketan__Patel__0011K Christian EhrlicherC 2 Replies Last reply
    0
    • M MartinGU

      Windows 10, Qt 6.7.0, MinGW.

      Added Qt 6.7.0 to my installation, 6.6.2 previous version.
      Just rebuilt code and tried to run.
      NO change in machine, Windows, code that is

      In 6.6.2 (and many versions before) code runs, works as it should
      In 6.7.0, database.open() does not work, fails to open database.
      "[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified, IM002|QODBC: Unable to connect|"

      I have seen the same error reported (for 6.7.0) in Stackoverflow (for MSSQL) but it was closed by a moderator that did not understand...

      /Martin

       database = QSqlDatabase::addDatabase("QODBC", sConnection);
       database.setDatabaseName("Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=" + sDsn);
       if (database.open())
         FAILS HERE
      
      Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #3

      @MartinGU Sorry, you have to wait for the 6.7.1 release. I added a bug and it was noticed to late. If you compile Qt by yourself then you can apply the one-liner patch.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      JonBJ 1 Reply Last reply
      3
      • M MartinGU

        Windows 10, Qt 6.7.0, MinGW.

        Added Qt 6.7.0 to my installation, 6.6.2 previous version.
        Just rebuilt code and tried to run.
        NO change in machine, Windows, code that is

        In 6.6.2 (and many versions before) code runs, works as it should
        In 6.7.0, database.open() does not work, fails to open database.
        "[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified, IM002|QODBC: Unable to connect|"

        I have seen the same error reported (for 6.7.0) in Stackoverflow (for MSSQL) but it was closed by a moderator that did not understand...

        /Martin

         database = QSqlDatabase::addDatabase("QODBC", sConnection);
         database.setDatabaseName("Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=" + sDsn);
         if (database.open())
           FAILS HERE
        
        Ketan__Patel__0011K Offline
        Ketan__Patel__0011K Offline
        Ketan__Patel__0011
        wrote on last edited by
        #2

        @MartinGU
        Did you install AccessDatabaseEngine Software in your system ?

        if not installed then Follow the link for download
        https://www.microsoft.com/en-us/download/details.aspx?id=54920

        1 Reply Last reply
        0
        • M MartinGU

          Windows 10, Qt 6.7.0, MinGW.

          Added Qt 6.7.0 to my installation, 6.6.2 previous version.
          Just rebuilt code and tried to run.
          NO change in machine, Windows, code that is

          In 6.6.2 (and many versions before) code runs, works as it should
          In 6.7.0, database.open() does not work, fails to open database.
          "[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified, IM002|QODBC: Unable to connect|"

          I have seen the same error reported (for 6.7.0) in Stackoverflow (for MSSQL) but it was closed by a moderator that did not understand...

          /Martin

           database = QSqlDatabase::addDatabase("QODBC", sConnection);
           database.setDatabaseName("Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=" + sDsn);
           if (database.open())
             FAILS HERE
          
          Christian EhrlicherC Offline
          Christian EhrlicherC Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #3

          @MartinGU Sorry, you have to wait for the 6.7.1 release. I added a bug and it was noticed to late. If you compile Qt by yourself then you can apply the one-liner patch.

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          JonBJ 1 Reply Last reply
          3
          • Christian EhrlicherC Christian Ehrlicher

            @MartinGU Sorry, you have to wait for the 6.7.1 release. I added a bug and it was noticed to late. If you compile Qt by yourself then you can apply the one-liner patch.

            JonBJ Offline
            JonBJ Offline
            JonB
            wrote on last edited by
            #4

            @Christian-Ehrlicher
            OP didn't link, but I found the post over at https://stackoverflow.com/questions/78271964/qt-6-7-odbc-mssql-connection-string-doesnt-work. Referred that OP to your post here, hope that's OK.

            Christian EhrlicherC 1 Reply Last reply
            0
            • JonBJ JonB

              @Christian-Ehrlicher
              OP didn't link, but I found the post over at https://stackoverflow.com/questions/78271964/qt-6-7-odbc-mssql-connection-string-doesnt-work. Referred that OP to your post here, hope that's OK.

              Christian EhrlicherC Offline
              Christian EhrlicherC Offline
              Christian Ehrlicher
              Lifetime Qt Champion
              wrote on last edited by
              #5

              @JonB And here the bug report: https://bugreports.qt.io/browse/QTBUG-123478

              Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
              Visit the Qt Academy at https://academy.qt.io/catalog

              1 Reply Last reply
              2
              • Christian EhrlicherC Christian Ehrlicher referenced this topic on
              • M MartinGU has marked this topic as solved on

              • Login

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