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. [Solved] Could anyone tell me if it's possible to apply QSqlDatabase to handle an Android sqlite file?
Forum Updated to NodeBB v4.3 + New Features

[Solved] Could anyone tell me if it's possible to apply QSqlDatabase to handle an Android sqlite file?

Scheduled Pinned Locked Moved General and Desktop
11 Posts 4 Posters 6.4k 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.
  • S Offline
    S Offline
    stukdev
    wrote on last edited by
    #2

    Welcome pico, remember that Qt in not QT (quicktime).

    1 Reply Last reply
    0
    • S Offline
      S Offline
      stukdev
      wrote on last edited by
      #3

      Are you using this function?
      "QSqlDatabase::tables":http://doc.qt.nokia.com/stable/qsqldatabase.html#tables

      this return a QStringList.

      [quote author="pico" date="1292337516"]Hi, All:
      Recently, I want to show data in Android sqlite file on a GUI application based on QT.
      However, I failed to use QSqlDatabase to get the total tables in file.
      It always says only "1" table in file, and, if I use another non-free software to see the file, I get 17 tables.
      So, I guess something wrong here.

      Is it possible to handle a database file retrieved from Android phone in a QT-based application?

      Thanks a lot.

      BR,
      Pico[/quote]

      1 Reply Last reply
      0
      • A Offline
        A Offline
        alexander
        wrote on last edited by
        #4

        It should be working . Qt SQLite plugin is based on sqlite.org.

        1 Reply Last reply
        0
        • P Offline
          P Offline
          pico
          wrote on last edited by
          #5

          Hi, Stuk:
          Thanks, I will always use Qt from now on.

          Yes, I use QSqlDatabase::tables to get QStringList.
          But, I use QStringList.::size() to check its number, I only get 1 instead of 17.
          Could you please tell me what I could do?

          1 Reply Last reply
          0
          • S Offline
            S Offline
            stukdev
            wrote on last edited by
            #6

            This is very strange are you try with a different sqlite with many tables?
            Sqlite is sqlite everywhere.

            [quote author="pico" date="1292381524"]Hi, Stuk:
            Thanks, I will always use Qt from now on.

            Yes, I use QSqlDatabase::tables to get QStringList.
            But, I use QStringList.::size() to check its number, I only get 1 instead of 17.
            Could you please tell me what I could do?
            [/quote]

            1 Reply Last reply
            0
            • P Offline
              P Offline
              pico
              wrote on last edited by
              #7

              Hi, Stuk:
              I don't try other sqlite with many tables. I also try to open this file with SQliteman, but, it fails.
              Only "SQlite Expert Professional 3" could open it with correct table lists now.
              Do I need to update Qt to v4.7?

              Thanks

              1 Reply Last reply
              0
              • S Offline
                S Offline
                stukdev
                wrote on last edited by
                #8

                Mmm, try open this file "link":http://jump.fm/FDAXP
                it have 3 tables.

                [quote author="pico" date="1292405590"]Hi, Stuk:
                I don't try other sqlite with many tables. I also try to open this file with SQliteman, but, it fails.
                Only "SQlite Expert Professional 3" could open it with correct table lists now.
                Do I need to update Qt to v4.7?

                Thanks

                [/quote]

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  andre
                  wrote on last edited by
                  #9

                  [quote author="pico" date="1292405590"]Do I need to update Qt to v4.7?[/quote]
                  Upgrading to the latest stable version is usually a good idea, yes.

                  1 Reply Last reply
                  0
                  • P Offline
                    P Offline
                    pico
                    wrote on last edited by
                    #10

                    Hi, All:
                    After upgrading to v4.7, the return result is OK.
                    Thanks a lot.

                    BR,

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      stukdev
                      wrote on last edited by
                      #11

                      Great !

                      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