QSqlDatabase db=QSqlDatabase: : addDatabase (" QODBC ");
Db. SetDatabaseName (" DRIVER={Microsoft Access DRIVER (*. MDB)}; FIL={MS Access}; DBQ=C: \ \ Users \ \ HJZ \ \ Documents \ \ QTPro \ \ Uver \ \ Database1 MDB ");
QDebug () & lt;if (! The isValid ())
{
QMessageBox: : information (& amp; W, ""," inValid ", QMessageBox: : Information);
}
Bool ok=db. The open ();
If (ok)
{
QMessageBox: : information (& amp; W, ""," succes, "QMessageBox: : Information);
}
The else
QMessageBox: : information (& amp; W, ""," filed ", QMessageBox: : Information);
Would you please tell me what the problem, connect Database1. The location of the MDB definitely to no problem, but it is incorrect, change of address to relative address error as well
CodePudding user response:
In addition, I have no password databaseCodePudding user response:
Updated qt, solveCodePudding user response:
Myself have ample food and clothing