PDA

View Full Version : SQLITE: Use self compiles driver instead of the build in one



Lykurg
21st July 2010, 16:49
Hi,

currently I play with different settings for SQLite but I recognized that even if the dll is on the right place, Qt uses the build in driver. (I am using the normal SDK for Windows.) Now I don't want to rebuild the module without the build in SQLite driver because I would like to use the "original" one, and wonder if there is a way to force Qt to use my self compiled SQLite dll instead the build in one.


Thanks,

Lykurg

saa7_go
21st July 2010, 18:12
I try to rebuild QSQLITE driver using the "original" SQLite. And Qt use my self compiled SQLite dll.

Lykurg
21st July 2010, 19:41
First: I hate windows!
Second: I HATE WINDOWS!
Third: I REALLY HATE WINDOWS!

Ehm, I found the error by accident! What was the problem. Before rebuilding the driver I backuped the old libraries. How? Good old CTRL+C & CTRL+V and get "Copy of qsqlite4.dll". For me that is a different file from "qsqlite4.dll" which I was building afterwards. But obviously when running my app, the "Copy of qsqlite4.dll" was used. Unbelievable! After deleting that file, all works as expected.

So, I found one more reason to adore Linux;)

saa7_go
22nd July 2010, 13:25
Although you rename qsqlite4.dll to qsqlpsql4.dll, QSqlDatabase::drivers() will not print "QPSQL" but "QSQLITE" (assuming in sqldrivers directory only qsqlpsql4.dll). Maybe you forgot that it is a plugin.

Lykurg
22nd July 2010, 15:46
Maybe you forgot that it is a plugin.
That's a point:rolleyes: Still I hate windows for choosing the "wrong" plugin ;)