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. [Solved] SQLITE driver not loaded
Forum Updated to NodeBB v4.3 + New Features

[Solved] SQLITE driver not loaded

Scheduled Pinned Locked Moved Installation and Deployment
5 Posts 2 Posters 6.5k 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.
  • R Offline
    R Offline
    rem45acp
    wrote on last edited by
    #1

    I recently built Qt with VS2010 following this tutorial here: "http://www.holoborodko.com/pavel/2011/02/01/how-to-compile-qt-4-7-with-visual-studio-2010/":http://www.holoborodko.com/pavel/2011/02/01/how-to-compile-qt-4-7-with-visual-studio-2010/ which worked perfectly.
    However, when I go to use QSqlDatabase I am unable to use it with SQLITE (drivers not loaded drivers not loaded).
    I believe that the tutorial I followed did build them because I can find all the dll's in the plugins/sqldrivers folder.
    I also created the sqldrivers folder in the applications executable directory, and put qsqlited4.dll and qsqlited4.lib in there with no success.
    Do I have to use the <QPlugin> functions to get this to work?

    Thank you for any help.

    1 Reply Last reply
    0
    • R Offline
      R Offline
      rem45acp
      wrote on last edited by
      #2

      Never mind I figured out the problem.

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mlong
        wrote on last edited by
        #3

        What was the problem?

        Software Engineer
        My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

        1 Reply Last reply
        0
        • R Offline
          R Offline
          rem45acp
          wrote on last edited by
          #4

          I was using the second parameter of the QSqlDatabase::addDatabase() function incorrectly. Its easy to forgot that static functions inside a class work just like normal functions.

          For those of you who have read the tutorial that I followed in the link I posted above, it appears that the standard configure commands builds the qsqlite dlls and libs automatically, without having to specify the switch in the parameters. No other databases are included though without an explicit switch.

          1 Reply Last reply
          0
          • M Offline
            M Offline
            mlong
            wrote on last edited by
            #5

            Good to know. Hopefully your solution can help anyone else that might be having the same problem.

            Don't forget to edit the topic title and add [Solved]. Thanks!

            Software Engineer
            My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

            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