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. QSqlite driver does not load
QtWS25 Last Chance

QSqlite driver does not load

Scheduled Pinned Locked Moved General and Desktop
sqldesktopdllqsqldatabasedriversqliteplugindeployment
20 Posts 4 Posters 18.9k 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.
  • M mrjj
    10 Jul 2015, 21:29

    @danks_
    :(
    if you
    qDebug() << QSqlDatabase::drivers();

    it does list sqlite?

    D Offline
    D Offline
    danks_
    wrote on 10 Jul 2015, 21:41 last edited by
    #11

    @mrjj
    ("QSQLITE", "QMYSQL", "QMYSQL3", "QODBC", "QODBC3", "QPSQL", "QPSQL7") is what I see, but I guess it's because I'm running from inside Qt

    M 1 Reply Last reply 10 Jul 2015, 21:44
    0
    • D danks_
      10 Jul 2015, 21:41

      @mrjj
      ("QSQLITE", "QMYSQL", "QMYSQL3", "QODBC", "QODBC3", "QPSQL", "QPSQL7") is what I see, but I guess it's because I'm running from inside Qt

      M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 10 Jul 2015, 21:44 last edited by mrjj 7 Oct 2015, 21:49
      #12

      @danks_ do you get same list from if you run it standalone ?
      I get only "QSQLITE" as expected.

      D 1 Reply Last reply 10 Jul 2015, 21:53
      1
      • M mrjj
        10 Jul 2015, 21:44

        @danks_ do you get same list from if you run it standalone ?
        I get only "QSQLITE" as expected.

        D Offline
        D Offline
        danks_
        wrote on 10 Jul 2015, 21:53 last edited by
        #13

        @mrjj Weirdly, I do get the same list from standalone...

        I wasn't sure about how to get the list from standalone, since standalone doesn't show qDebug, so I did the following:

         QStringList testStr;
         testStr << QSqlDatabase::drivers();
         QString str = testStr.join("");
         str = testStr.join(",");
         QMessageBox boxQry;
                    boxQry.setText(str);
                    boxQry.exec();
        

        Standalone folder only has sqlite.dll inside of sqldrivers folder, I'm really confused now.

        M 1 Reply Last reply 10 Jul 2015, 22:06
        0
        • D danks_
          10 Jul 2015, 21:53

          @mrjj Weirdly, I do get the same list from standalone...

          I wasn't sure about how to get the list from standalone, since standalone doesn't show qDebug, so I did the following:

           QStringList testStr;
           testStr << QSqlDatabase::drivers();
           QString str = testStr.join("");
           str = testStr.join(",");
           QMessageBox boxQry;
                      boxQry.setText(str);
                      boxQry.exec();
          

          Standalone folder only has sqlite.dll inside of sqldrivers folder, I'm really confused now.

          M Offline
          M Offline
          mrjj
          Lifetime Qt Champion
          wrote on 10 Jul 2015, 22:06 last edited by
          #14

          @danks_
          oh so it list all drivers even it should only see the lite one.
          That is not what I would expect.

          I also checked in release build and still only got QSQLITE.

          Also I wonder a bit about
          db.setDatabaseName (File Path); error as I use that call.

          db = QSqlDatabase::addDatabase ( "QSQLITE" );
              db.setDatabaseName ( DBPath );        
              if ( db.open() )  ...
          

          Also Im using qt 5.4 so I wonder if setDatabaseName was dropped.

          D 1 Reply Last reply 10 Jul 2015, 22:12
          1
          • M mrjj
            10 Jul 2015, 22:06

            @danks_
            oh so it list all drivers even it should only see the lite one.
            That is not what I would expect.

            I also checked in release build and still only got QSQLITE.

            Also I wonder a bit about
            db.setDatabaseName (File Path); error as I use that call.

            db = QSqlDatabase::addDatabase ( "QSQLITE" );
                db.setDatabaseName ( DBPath );        
                if ( db.open() )  ...
            

            Also Im using qt 5.4 so I wonder if setDatabaseName was dropped.

            D Offline
            D Offline
            danks_
            wrote on 10 Jul 2015, 22:12 last edited by
            #15

            @mrjj
            Maybe I should go to 5.4 and try my luck :)
            I guess I'll let you know, thanks a lot for your help!

            M 1 Reply Last reply 10 Jul 2015, 22:22
            0
            • D danks_
              10 Jul 2015, 22:12

              @mrjj
              Maybe I should go to 5.4 and try my luck :)
              I guess I'll let you know, thanks a lot for your help!

              M Offline
              M Offline
              mrjj
              Lifetime Qt Champion
              wrote on 10 Jul 2015, 22:22 last edited by
              #16

              @danks_
              Well, there is no reason it should not work in 5_5. but could be fun to test 5.4 just to see.
              tomorrow I will try 5_5 in virtual machine. I was planning to upgrade :)

              You are most welcome. Sadly we did not find a fix.

              D 1 Reply Last reply 10 Jul 2015, 22:25
              0
              • M mrjj
                10 Jul 2015, 22:22

                @danks_
                Well, there is no reason it should not work in 5_5. but could be fun to test 5.4 just to see.
                tomorrow I will try 5_5 in virtual machine. I was planning to upgrade :)

                You are most welcome. Sadly we did not find a fix.

                D Offline
                D Offline
                danks_
                wrote on 10 Jul 2015, 22:25 last edited by
                #17

                @mrjj It's all about learning, maybe someone will post a solution sometime :) if 5.4 gets it done, there's no real downside for me haha

                M 1 Reply Last reply 10 Jul 2015, 22:56
                0
                • D danks_
                  10 Jul 2015, 22:25

                  @mrjj It's all about learning, maybe someone will post a solution sometime :) if 5.4 gets it done, there's no real downside for me haha

                  M Offline
                  M Offline
                  mrjj
                  Lifetime Qt Champion
                  wrote on 10 Jul 2015, 22:56 last edited by
                  #18

                  @danks_
                  Absolutely. Yeah if we are lucky someone will show us the light tomorrow :)
                  I have this feeling it is something very simple.

                  D 1 Reply Last reply 11 Jul 2015, 00:20
                  1
                  • M mrjj
                    10 Jul 2015, 22:56

                    @danks_
                    Absolutely. Yeah if we are lucky someone will show us the light tomorrow :)
                    I have this feeling it is something very simple.

                    D Offline
                    D Offline
                    danks_
                    wrote on 11 Jul 2015, 00:20 last edited by
                    #19

                    @mrjj 5.4 worked flawlessly, maybe a bug to be reported? :p

                    M 1 Reply Last reply 11 Jul 2015, 08:39
                    0
                    • D danks_
                      11 Jul 2015, 00:20

                      @mrjj 5.4 worked flawlessly, maybe a bug to be reported? :p

                      M Offline
                      M Offline
                      mrjj
                      Lifetime Qt Champion
                      wrote on 11 Jul 2015, 08:39 last edited by mrjj 7 Nov 2015, 10:04
                      #20

                      @danks_
                      That is good to hear !
                      Could also been some kind of setup problem with 5_5 but yeah it does
                      seems like a bug.

                      I will try with 5_5 and see it it fails for me too.

                      update:
                      Tested win pure 5_5 install
                      It worked by copying the DLLs ! ?
                      Even worked with no sub sqldrivers folder ...!
                      (in the release folder)

                      But when moved out of the virtual machines
                      it did want the sqldrivers folder to work.

                      So the current version of 5.5 via the online installer does seems to work in regards to sql.?!

                      1 Reply Last reply
                      0

                      20/20

                      11 Jul 2015, 08:39

                      • Login

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