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. SQL driver stoppe with qt6.7

SQL driver stoppe with qt6.7

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 250 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.
  • J Offline
    J Offline
    JulsPower
    wrote on last edited by
    #1

    Hi all
    I have the following code :

        db = QSqlDatabase::addDatabase("QODBC");
        db.setUserName("Julien");
        db.setPassword("MB6262");
        db.setDatabaseName("Driver={SQL Server};Server=192.168.21.174;Database=DBMachines;");
    
        if(!db.open())
        {
            qDebug(db.lastError().text().toStdString().c_str());
            QTimer::singleShot(5000, [&](){ConnectDB();});   //Recall dans 5 sec
        }
        else
        {
            emit DbStatusChanged(true);
            RefreshF05();
            RefreshSilicone();
            RefreshCauseArret();
            RefreshPTH1();
            RefreshPTH2();
        }
    

    Its working in qt 6.4.1 but in qt 6.7 I get unable to connect error
    anyone have an idea what changed that make my connection string fail?

    thank you

    Christian EhrlicherC 1 Reply Last reply
    0
    • J JulsPower

      Hi all
      I have the following code :

          db = QSqlDatabase::addDatabase("QODBC");
          db.setUserName("Julien");
          db.setPassword("MB6262");
          db.setDatabaseName("Driver={SQL Server};Server=192.168.21.174;Database=DBMachines;");
      
          if(!db.open())
          {
              qDebug(db.lastError().text().toStdString().c_str());
              QTimer::singleShot(5000, [&](){ConnectDB();});   //Recall dans 5 sec
          }
          else
          {
              emit DbStatusChanged(true);
              RefreshF05();
              RefreshSilicone();
              RefreshCauseArret();
              RefreshPTH1();
              RefreshPTH2();
          }
      

      Its working in qt 6.4.1 but in qt 6.7 I get unable to connect error
      anyone have an idea what changed that make my connection string fail?

      thank you

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

      @JulsPower said in SQL driver stoppe with qt6.7:

      anyone have an idea what changed that make my connection string fail?

      Please use the forum search function: https://forum.qt.io/post/796986

      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
      0
      • J Offline
        J Offline
        JulsPower
        wrote on last edited by
        #3

        Hi
        Sorry for doubling, I did try to search from google and not the right forum search.
        good to know is a qt bug ill wait 6.7.1 to move to 6.7

        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