Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to deliver sqlite driver to the end user?

Tags:

sqlite

qt

driver

My program written in Qt C++ calls the sqlite database. On my own computer it works good, but on the end user's computer it says "Driver not loaded". True, I don't know which files/dlls should be copied/installed,

can you please help me?

Update: I found I need to copy sqlite3.dll, sqlite3.def and sqlite3.exe into windows/system32 folder OR the folder of my program but it still cannot load database.

OS is Windows xP.

Thanks

like image 553
mimic Avatar asked Jun 13 '11 03:06

mimic


People also ask

How do I connect to a SQLite database?

Select SQLite from the list. Give a Connection name for your own internal reference. For Database , click Choose a File and then select the database file on your local machine to which you want to connect. Hit Connect and you're all set!

Do you need to install SQLite to use it?

SQLite does not need to be "installed" before it is used. There is no "setup" procedure. There is no server process that needs to be started, stopped, or configured. There is no need for an administrator to create a new database instance or assign access permissions to users.

Does SQLite need a server?

The software does not require any license after installation. SQLite is serverless as it doesn't need a different server process or system to operate. SQLite facilitates you to work on multiple databases on the same session simultaneously, thus making it flexible.


2 Answers

Try to copy qsqlite4.dll (or qsqlite4d.dll, if you are distributing a debug build) from your $QTDIR\plugins\sqldrivers folder to a sqldrivers subfolder in your program folder. Qt should then be able to pick it up from there, if you don't use anything special...

like image 82
Manjabes Avatar answered Dec 17 '22 21:12

Manjabes


Please read the Windows deployment guide, plugins section. You are not supposed to drop things in windows\system32, there's a specific directory structure to follow. The exact paths depend on your Qt installation and your application path.

like image 37
Mat Avatar answered Dec 17 '22 20:12

Mat