Results 1 to 2 of 2

Thread: SQLite

  1. #1
    Join Date
    Jan 2008
    Posts
    58
    Thanks
    3
    Qt products
    Qt4
    Platforms
    MacOS X

    Default SQLite

    Hi everybody,

    I'm currently busy developing a QT app. My developing studio is in mac with xcode and everything works fine. But the application has to run on a windows machine. (That's the reason why I'm using Qt). So I installed Qt on a virtual machine with windows XP. I ran the command line to install the debug libraries.

    Everything went fine, the program compiled and after including some .dll files everything worked fine. But when I take the compiled project and try to run the program on a different computer it said: "The program need an SQLite driver", this is a custom error so this is the code that produces the error :
    Qt Code:
    1. //check drivers
    2. if (!QSqlDatabase::drivers().contains("QSQLITE"))
    3. QMessageBox::critical(this, "Unable to load database", "This program needs a SQLite driver");
    To copy to clipboard, switch view to plain text mode 

    But when I search in the map there is a sqlite database. Only none of the queries in the program works.

    What do I need to include to make it work? I included the .dll from www.sqlite.org but that works neither.

    Greetz,

    Cyberboy

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: SQLite

    copy plugins/sqldrivers/qsqlite.dll into sqldrivers directory on the target machine alongside the binary.

    It should look like this
    somepath\myapp.exe
    somepath\sqldrivers\qsqlite.dll

  3. The following user says thank you to wysota for this useful post:

    cyberboy (16th April 2008)

Similar Threads

  1. sqlbrowser and sqlite
    By janus in forum Installation and Deployment
    Replies: 2
    Last Post: 31st March 2008, 14:59
  2. The Sqlite Error In Run!
    By alphaboy in forum Installation and Deployment
    Replies: 1
    Last Post: 19th November 2007, 14:45
  3. Bulk insert into SQLite
    By munna in forum Qt Programming
    Replies: 6
    Last Post: 19th November 2007, 03:56
  4. SQLite make problems
    By raphaelf in forum Newbie
    Replies: 21
    Last Post: 3rd July 2007, 14:40
  5. SQLITE database problems
    By phoenix in forum Newbie
    Replies: 3
    Last Post: 30th April 2007, 21:38

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.