Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. ios13 sqlite attempt to write a readonly database
Forum Update on Monday, May 27th 2025

ios13 sqlite attempt to write a readonly database

Scheduled Pinned Locked Moved Solved Mobile and Embedded
2 Posts 1 Posters 354 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Bayesky
    wrote on last edited by Bayesky
    #1

    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?

    1 Reply Last reply
    0
    • B Offline
      B Offline
      Bayesky
      wrote on last edited by
      #2

      I found that I must set permission after copy it

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved