Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. QSQLITE driver not loaded

QSQLITE driver not loaded

Scheduled Pinned Locked Moved Installation and Deployment
9 Posts 4 Posters 8.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.
  • A Offline
    A Offline
    amritmishra
    wrote on last edited by
    #1

    I am making an application in VS 2008 using Qt plugin.
    I am able to run the app successfully in VS . But after making package I am getting QSQLITE error. I have added qsqlite.dll with the package also.
    But I am not able to run the app. Due to database error. How to solve that??

    Edit: Moved to Installation & Deployment, as that seems to be the main issue; Andre

    Amrit Mishra
    Software Developer
    amritmishra@vimukti.com

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

      Where did you put that .dll file?

      1 Reply Last reply
      0
      • A Offline
        A Offline
        amritmishra
        wrote on last edited by
        #3

        I have used the code

        @
        QStringList str;
        str <<".";
        a.setLibraryPaths(str);
        a.addLibraryPath("./Debug/plugins/");
        qDebug()<<"my library path : "<<a.libraryPaths();
        @

        SO I have created a Debug/plugins/ path & inserted all the files. BUt It did not work.

        Does this problem is related to static or shared libraries ??

        [EDIT: code formatting, please wrap in @-tags, Volker]

        Amrit Mishra
        Software Developer
        amritmishra@vimukti.com

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

          Does it work if you create a directory called "sqldrivers" in the directory where you have your executable, and put the .dll file in that directory?

          1 Reply Last reply
          0
          • A Offline
            A Offline
            amritmishra
            wrote on last edited by
            #5

            Yes I have tried all shots of procedures I can do : tried adding the drivers all where but still not working.

            Amrit Mishra
            Software Developer
            amritmishra@vimukti.com

            1 Reply Last reply
            0
            • G Offline
              G Offline
              goetz
              wrote on last edited by
              #6

              Relative paths are evil - you never know what the working directory is. Use

              @
              a.addLibraryPath(QCoreApplication::applicationDirPath() + "/Debug/plugins/")
              @

              And make sure the driver is in ./Debug/plugins/sqldrivers

              http://www.catb.org/~esr/faqs/smart-questions.html

              1 Reply Last reply
              0
              • D Offline
                D Offline
                dialingo
                wrote on last edited by
                #7

                I found it more reliable to simply add the C source file of SQLITE to my projects. No more deployment hazzle, no more dll hell, no more precedence trouble if a second sqlite.dll is on the target system. SQLITE offers the amalgam file = one file which contains the complete database source. Try to use this.

                1 Reply Last reply
                0
                • G Offline
                  G Offline
                  goetz
                  wrote on last edited by
                  #8

                  If you build the plugin against the builtin version of SQLite it uses the amalgam version. There is no need to distribute sqlite.dll, but you do need to distribute libqsqlite.dll!

                  http://www.catb.org/~esr/faqs/smart-questions.html

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

                    Thanks @Volker it solved my problem

                    Amrit Mishra
                    Software Developer
                    amritmishra@vimukti.com

                    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