Set connection name for QSqlDatabase. How?
-
wrote on 4 Nov 2019, 17:39 last edited by
Hello all!
I've got this error:QSqlDatabasePrivate::removeDatabase: connection 'qt_sql_default_connection' is still in use, all queries will cease to work. QSqlDatabasePrivate::addDatabase: duplicate connection name 'qt_sql_default_connection', old connection removed.
Briefly - I am using for user data and for storing logs QSqlDatabase, and there are two separated DB one for user one for logbook. Is there any way to define connection name and use it in parallel without affecting each other ?
-
wrote on 4 Nov 2019, 17:42 last edited by
Solution found https://doc.qt.io/qt-5/qsqldatabase.html#addDatabase
Issue closed. -
Hi
Yes there is
https://forum.qt.io/topic/76810/use-two-or-more-sqlite-database-at-the-same-time/2see jsulm answer
-
Solution found https://doc.qt.io/qt-5/qsqldatabase.html#addDatabase
Issue closed.@bogong
haha. same time :) -
1/5