Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Solved Building QT with "windeployqt": not connect to database (ODBC)

    Installation and Deployment
    database odbc windeployqt build
    4
    24
    1083
    Loading More Posts
    • 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.
    • hskoglund
      hskoglund last edited by

      Hi, just guessing, are you using 127.0.0.1 (or localhost) to connect to the database also on the new PC? Also, have you checked that you can reach the database with MySQL workbench?

      1 Reply Last reply Reply Quote 0
      • A
        AndreaCT last edited by

        Yes to both

        1 Reply Last reply Reply Quote 0
        • hskoglund
          hskoglund last edited by

          Ok. Is it same version of Windows 10 on both computers?

          A 1 Reply Last reply Reply Quote 0
          • J
            JSher last edited by

            Is the ODCB connection created on 2nd computer? Also with mysql connector you need Visual C++2015 distro.

            --James

            1 Reply Last reply Reply Quote 0
            • A
              AndreaCT @hskoglund last edited by

              @hskoglund Yes

              1 Reply Last reply Reply Quote 0
              • A
                AndreaCT last edited by

                @JSher No, I just tried to print the error on a label with db.lastError() and the output is: "[Microsoft][Driver Manager ODBC] Nome origine dati non trovato e driver predefinito non specificato. QODBC3: Unable to connect"

                1 Reply Last reply Reply Quote 0
                • J
                  JSher last edited by

                  Sorry what I meant was did you configure the ODBC data source on the 2nd computer.

                  Like this:

                  https://stackoverflow.com/questions/25165525/how-to-connect-to-a-mysql-database-through-odbc-from-qt-application

                  --James

                  1 Reply Last reply Reply Quote 0
                  • A
                    AndreaCT last edited by

                    No, this procedure is necessary for each device that must use the application?

                    1 Reply Last reply Reply Quote 0
                    • J
                      JSher last edited by

                      Its connecting to an OBDC entry in windows by the looks of it. I do not use ODBC much but the way I understand it is you have to make the entry on each machine....Thats why I use the standard mysql connector, then you do not. I could be off:)

                      --James

                      1 Reply Last reply Reply Quote 0
                      • A
                        AndreaCT last edited by

                        @JSher said in Building QT with "windeployqt": not connect to database (ODBC):

                        Its connecting to an OBDC entry in windows by the looks of it. I do not use ODBC much but the way I understand it is you have to make the entry on each machine....Thats why I use the standard mysql connector, then you do not. I could be off:)

                        Ok thank you very much!!! I evaluate the transition to the mysql connector

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post