[Qt-interest] QSqlDatabase duplicate connection problem , when connection name is epecified
Aaron Lewis
the.warl0ck.1989 at gmail.com
Sun May 22 08:34:26 CEST 2011
Hi,
First of all , should i call QSqlDatabase:;removeDatabase each time
when finished using it ?
Besides , i initiate my connection with the following code , in this
case , it's threaded and use the same database file for all
QThread based class:
QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE" , "ConnectionTest" + rand() % 100);
blabla..
db.close();
Which try to take use of different connection name , but i still
receive the following message in terminal:
QSqlDatabasePrivate::addDatabase: duplicate connection name 'us connection in worker', old connection removed.
Is that wired or i missed some part of code ?
Many thanks.
--
Best Regards,
Aaron Lewis - PGP: 0xDFE6C29E ( http://http://pgp.mit.edu/ )
Finger Print: 9482 448F C7C3 896C 1DFE 7DD3 2492 A7D0 DFE6 C29E
More information about the Qt-interest-old
mailing list