ios13 sqlite attempt to write a readonly database
-
wrote on 15 Oct 2019, 11:21 last edited by Bayesky
I have copied a database from qml.qrc to /Documents/databases, like this:
QString dir; QDir current_dir; dir = QDir::homePath()+"/Documents/databases"; if(current_dir.exists(dir) == false){ current_dir.mkpath(dir); QFile::copy(":/MyDataBase.db", QDir::homePath()+"/Documents/databases/MyDataBase.db"); }
And when I update the table, it said that
QSqlError("8", "Unable to fetch row", "attempt to write a readonly database")
What could I do for that?
-
wrote on 15 Oct 2019, 12:11 last edited by
I found that I must set permission after copy it
1/2