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. Unable to retrieve data from MySQL

Unable to retrieve data from MySQL

Scheduled Pinned Locked Moved General and Desktop
9 Posts 2 Posters 1.8k Views 2 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.
  • DuncanD Offline
    DuncanD Offline
    Duncan
    wrote on last edited by
    #1
    This post is deleted!
    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Empty database ?

      SQLite database connection will always succeed in the sense that if there's no database a new one is created (that's how SQLite works internally it's not Qt specific)

      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
      • DuncanD Offline
        DuncanD Offline
        Duncan
        wrote on last edited by
        #3
        This post is deleted!
        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Is it located in the same folder as your application ?

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

          DuncanD 1 Reply Last reply
          0
          • DuncanD Offline
            DuncanD Offline
            Duncan
            wrote on last edited by
            #5
            This post is deleted!
            1 Reply Last reply
            0
            • SGaistS SGaist

              Is it located in the same folder as your application ?

              DuncanD Offline
              DuncanD Offline
              Duncan
              wrote on last edited by
              #6
              This post is deleted!
              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #7

                There's something not clear… Your title talks about MySQL but your code tries to use a sqlite database, which one is correct ?

                If we are talking about sqlite: since you are not giving the full path to your database file, then it must be in the same folder as the application.

                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
                • DuncanD Offline
                  DuncanD Offline
                  Duncan
                  wrote on last edited by Duncan
                  #8
                  This post is deleted!
                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    If you are using a MySQL database why change to SQLite ?

                    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

                    • Login

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