[Qt-interest] connect mysql

Malyushytsky, Alex alex at wai.com
Mon Sep 19 23:40:46 CEST 2011


I guess clear() is not enough or there is another query which was not cleared.
According to documentation you have to make sure no open queries on the database connection when this function is called.
For some reason it does not.

Alex


From: qt-interest-bounces+alex=wai.com at qt.nokia.com [mailto:qt-interest-bounces+alex=wai.com at qt.nokia.com] On Behalf Of pengliang(??)
Sent: Tuesday, September 13, 2011 11:32 PM
To: qt-interest at qt.nokia.com
Subject: [Qt-interest] connect mysql

Hello
   I don’t know why application always output that information. Anybody could tell me why.



---------------------------------    snippets
    query.clear();
    f5ErpDb.close();
    f5ErpDb.removeDatabase("QODBC");

    camMysqlDb = QSqlDatabase::addDatabase("QMYSQL");


-------------------    application output
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.














---------------------------------------------------------------------------------------------------
Weidlinger Associates, Inc. made the following annotations.

“This message and any attachments are solely for the intended recipient and may contain confidential or privileged information. If you are not the intended recipient, any disclosure, copying, use, or distribution of the information included in this message and any attachments is prohibited. If you have received this communication in error, please notify us by reply e-mail and immediately and permanently delete this message and any attachments. Thank you.”

“Please consider our environment before printing this email.”


More information about the Qt-interest-old mailing list