May be some one met with such problem. QSqlDatabase not see tables in the file. This is my code:
_dbase = QSqlDatabase::addDatabase("QSQLITE");
_dbase.setDatabaseName("C:\development\WordsMemorizing\ex1");
if (!_dbase.open())
{
throw std::runtime_error(_dbase.lastError().text().toStdString());
}
std::cout << _dbase.tables().size() << std::endl;
Number of tables in std::cout is 0. File is correct and i can see my table via sqlite3 app. What is wrong?
Aucun commentaire:
Enregistrer un commentaire