Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QSqlError(5, "Unable to fetch row", "database is locked")
QtWS25 Last Chance

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

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 2.1k 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.
  • R Offline
    R Offline
    rizoritis
    wrote on 4 Feb 2014, 02:27 last edited by
    #1

    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);
    database->query->exec();
    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??

    Thanks!

    1 Reply Last reply
    0
    • R Offline
      R Offline
      rizoritis
      wrote on 11 Feb 2014, 19:07 last edited by
      #2

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

      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