当前位置:网站首页>QT connection MySQL data query failed

QT connection MySQL data query failed

2022-06-26 10:58:00 CSDN Q & A

problem

Normal at initial query , You can find the data

img

img

The software does not operate approximately 10 minute , We can't find the data

img

You can confirm that the database is still connected

img

        QSqlQuery query;        QString sql = QString("SELECT word,mean,time FROM words WHERE id = '%1'").arg(id);        qDebug() << sql << '\n'; query.exec(sql);        qDebug() << query.size() << '\n'; wordInfo t; while(query.next())        {            qDebug() << "word" << '\n';        }
My solution ideas and tried methods

There is no problem with the time configuration displayed in the database

img

原网站

版权声明
本文为[CSDN Q & A]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/177/202206191727172116.html