QSqlError(5, "Unable to fetch row", "database is locked")

  • Hello,

    I ran into the error, QSqlError(5, "Unable to fetch row", "database is locked") , when trying to implement the following UPDATE query:

    @ database->query->prepare("UPDATE points SET name = :name, x = :x, y = :y, z = :z, a = :a WHERE id = :id");
    database->query->bindValue(":id", row);
    database->query->bindValue(":name", name);
    //database->query->bindValue(":gantry", " ");
    database->query->bindValue(":x", x);
    database->query->bindValue(":y", y);
    database->query->bindValue(":z", z);
    database->query->bindValue(":a", theta);
    qDebug() << database->query->lastError();@

    When I try other queries such as SELECT or anything else in other portions of my code it works. I am assuming that there is some sort of lock as the error says on the query however I do not know how to check for this and thus I cannot trace it. I have two connections to my database with two separate connectionNames but I never (at least not to my knowledge) access the database at the same time. Everything is serial. I do not have any parallel processes.

    Any ideas??


  • Does anyone possibly know what the problem can be????

Log in to reply