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. QSqlDriver does not support Transactions (but everything seems to be installed)

QSqlDriver does not support Transactions (but everything seems to be installed)

Scheduled Pinned Locked Moved Unsolved General and Desktop
17 Posts 3 Posters 4.1k 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.
  • S Offline
    S Offline
    SGaist
    Lifetime Qt Champion
    wrote on 3 Jan 2018, 21:28 last edited by
    #8

    Not necessarily. The transaction detection is effective if the client library version used to build the plugin is greater than 3.23.34. Now the question is is, are you sure the server supports it ?

    Interested in AI ? www.idiap.ch
    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

    M 1 Reply Last reply 4 Jan 2018, 06:39
    0
    • S SGaist
      3 Jan 2018, 21:28

      Not necessarily. The transaction detection is effective if the client library version used to build the plugin is greater than 3.23.34. Now the question is is, are you sure the server supports it ?

      M Offline
      M Offline
      MrEinsA
      wrote on 4 Jan 2018, 06:39 last edited by
      #9

      @SGaist
      Thanks for the answer ... yes im sure, i tested it in the MySQL Workbench and its running there. Hm maybe i should reinstall everything again.

      1 Reply Last reply
      0
      • M Offline
        M Offline
        MrEinsA
        wrote on 5 Jan 2018, 15:13 last edited by
        #10

        Hello all,

        if i generate the transaction by myself with QSqlQuery ... it works ... but not with the functions provided by the QSqlDriver. Hmpf

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 5 Jan 2018, 18:35 last edited by
          #11

          How were you using it ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          M 1 Reply Last reply 8 Jan 2018, 06:59
          0
          • S SGaist
            5 Jan 2018, 18:35

            How were you using it ?

            M Offline
            M Offline
            MrEinsA
            wrote on 8 Jan 2018, 06:59 last edited by
            #12

            @SGaist
            Hi, like this:

               m_dbConnection.setHostName(host);
                m_dbConnection.setPort(port);
                if (!m_dbConnection.open(user, password))
                {
                    return false;
                }
            
                if (!m_dbConnection.driver()->hasFeature(QSqlDriver::Transactions))
                {
                    ...
                }
            
            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 8 Jan 2018, 22:23 last edited by
              #13

              So basically if you don't do the check and use it, it works as expected ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              M 1 Reply Last reply 9 Jan 2018, 06:22
              0
              • S SGaist
                8 Jan 2018, 22:23

                So basically if you don't do the check and use it, it works as expected ?

                M Offline
                M Offline
                MrEinsA
                wrote on 9 Jan 2018, 06:22 last edited by
                #14

                @SGaist
                Nope ... i tested it a lot and it dont work.

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on 9 Jan 2018, 23:01 last edited by
                  #15

                  Sorry, I misunderstood you. So if you write the transaction in the SQL statement of the QSqlQuery it's working properly. Correct this time ?

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  M 1 Reply Last reply 10 Jan 2018, 13:38
                  0
                  • S SGaist
                    9 Jan 2018, 23:01

                    Sorry, I misunderstood you. So if you write the transaction in the SQL statement of the QSqlQuery it's working properly. Correct this time ?

                    M Offline
                    M Offline
                    MrEinsA
                    wrote on 10 Jan 2018, 13:38 last edited by
                    #16

                    @SGaist
                    Yes if i write the transaction sql syntax in the QSqlQuery by myself ... it is working correctly.

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on 14 Jan 2018, 22:24 last edited by
                      #17

                      That's not the most easy but I'd re-build the MySQL plugin to see what the check does currently.

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      0

                      17/17

                      14 Jan 2018, 22:24

                      • Login

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