Could it be possible to have two different connections to handle two different databases?
-
Hi, Sir:
I use QSqliteDatabase to addDatabse for two different files, however, it always show me "driver not loaded".
Could anyone teach me how to have two databases simultaneously?PS: I don't use "attach" way because I need to handle them as two different connections.
Thanks a lot.
BR,
Pico -
You can call addDatabase() twice; just be sure to give different connection names in the two calls. In subsequent calls to QSqlDatabase::database() put the name of the desired connection to the argument list.
For your errors: Show us some code please, we cannot guess what you are doing.