QSqlite driver does not load
-
@Leonardo
Yes, should be the -d version. thank you for catching. i used the folder to test standalone also even in debug builds.After reading OPs post more carefully , it seems the only difference is
Qt5Sql.dll vs libsqlite3-0 -
@mrjj I'm running it from inside QT, the file is located here:
Documents\build-LNCA-Desktop_Qt_5_5_0_MinGW_32bit-Debug\debugSo I created the folder
Documents\build-LNCA-Desktop_Qt_5_5_0_MinGW_32bit-Debug\debug\sqldriversand added qsqlite.dll (and d.dll), and added Qt5Sql.dll (and d.dll), error persists,.
-
@danks_
Damn, so even it sounded the same, the fix was not. You seems to copy files to correct/same place.Well, then I think Leonardos suggestion is pretty good, try to use the deployment tool and see if
copy some extra dlls. -
@mrjj Weirdly, I do get the same list from standalone...
I wasn't sure about how to get the list from standalone, since standalone doesn't show qDebug, so I did the following:
QStringList testStr; testStr << QSqlDatabase::drivers(); QString str = testStr.join(""); str = testStr.join(","); QMessageBox boxQry; boxQry.setText(str); boxQry.exec();
Standalone folder only has sqlite.dll inside of sqldrivers folder, I'm really confused now.
-
@danks_
oh so it list all drivers even it should only see the lite one.
That is not what I would expect.I also checked in release build and still only got QSQLITE.
Also I wonder a bit about
db.setDatabaseName (File Path); error as I use that call.db = QSqlDatabase::addDatabase ( "QSQLITE" ); db.setDatabaseName ( DBPath ); if ( db.open() ) ...
Also Im using qt 5.4 so I wonder if setDatabaseName was dropped.
-
@danks_
Well, there is no reason it should not work in 5_5. but could be fun to test 5.4 just to see.
tomorrow I will try 5_5 in virtual machine. I was planning to upgrade :)You are most welcome. Sadly we did not find a fix.
-
@danks_
That is good to hear !
Could also been some kind of setup problem with 5_5 but yeah it does
seems like a bug.I will try with 5_5 and see it it fails for me too.
update:
Tested win pure 5_5 install
It worked by copying the DLLs ! ?
Even worked with no sub sqldrivers folder ...!
(in the release folder)But when moved out of the virtual machines
it did want the sqldrivers folder to work.So the current version of 5.5 via the online installer does seems to work in regards to sql.?!