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:

Qt Code:
  1. QSqlQuery *qry = new QSqlQuery();
  2.  
  3. qry->prepare("DROP TABLE Month");
  4.  
  5. if(!qry->exec()){
  6.  
  7. qDebug() << qry->lastError().text();
  8.  
  9. }
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:

Qt Code:
  1. QSqlQuery *qry1 = new QSqlQuery();
  2.  
  3. if(!qry1->exec("CREATE TABLE IF NOT EXISTS Month (Codice NUMERIC, Prodotto TEXT, Qta TEXT)"))
  4.  
  5. qDebug() << qry1->lastError().text();
  6.  
  7. 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 !!!!