Hi to all,
I have a problem with a db software that I create for my friend. The problem is the following:
When I do:
qry->prepare("DROP TABLE Month");
if(!qry->exec()){
qDebug() << qry->lastError().text();
}
QSqlQuery *qry = new QSqlQuery();
qry->prepare("DROP TABLE Month");
if(!qry->exec()){
qDebug() << qry->lastError().text();
}
To copy to clipboard, switch view to plain text mode
I get the following error during the application runtime:
"database table is locked Unable to fetch row"
How can I solve this problem? I try to Delete the table with sqlite_browser but after that I re-create the table Month with:
if(!qry1->exec("CREATE TABLE IF NOT EXISTS Month (Codice NUMERIC, Prodotto TEXT, Qta TEXT)"))
qDebug() << qry1->lastError().text();
delete qry1;
QSqlQuery *qry1 = new QSqlQuery();
if(!qry1->exec("CREATE TABLE IF NOT EXISTS Month (Codice NUMERIC, Prodotto TEXT, Qta TEXT)"))
qDebug() << qry1->lastError().text();
delete qry1;
To copy to clipboard, switch view to plain text mode
and try to DROP the table Month, I obtain the same error.
My db is in qsqlite.
Sorry for my bad english but I'm italian and I hope that we can understand my really bad english
Thanks a lot in advance !!!!
Bookmarks