QSqlError("", "driver not loaded", "driver not loaded") 是一个由 Qt 框架中的 QSqlError 类生成的错误信息,表明尝试使用的数据库驱动没有被成功加载。这里的错误信息非常直接,指出“driver not loaded”(驱动未加载)。 可能导致该错误的原因 驱动未安装:相应的数据库驱动(如 QSQLITE, QMYSQL, QPSQL 等...
jveitchmichaeliscommentedJan 2, 2020• edited Ok, I'll label this as a bug for now. Can you try an older release, please? Maybe something's not been uploaded correctly in the latest one. Maybe also check where you've saved the project database? Perhaps it's not writeable. ...
QSqlDatabase: QMYSQL driver not loaded QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QODBC QODBC3 QPSQL QPSQL7 场景 使用Qt Create连接数据库时抛出错误,连接代码具体如下: db = QSqlDatabase::addDatabase(database.DatabaseType);//MySQL数据库 db.setHostName(database.DatabaseIP); // ...
query.bindValue(":MESSAGE", item->message);if(!query.exec()) {// Suppress Driver not loaded errors that occur at startup.// and suppress additional errors for one second after the// previous error (to avoid spamming the log).QSqlError err = query.lastError();if((err.type() !=1||...
{// Suppress Driver not loaded errors that occur at startup.// and suppress additional errors for one second after the// previous error (to avoid spamming the log).QSqlError err = query.lastError();if((err.type() !=1|| err.number() !=-1) && ...
.arg(select.lastError().driverText());return-20; } QSqlQuery upsert;if(pkgitemid >=0) upsert.prepare("UPDATE pkgitem SET pkgitem_descrip=:descrip,"" pkgitem_item_id=:itemid ""WHERE (pkgitem_id=:id);");else{ upsert.prepare("SELECT NEXTVAL('pkgitem_pkgitem_id_seq');"); ...