SQLite database is locked



  • Hi.
    I am facing the following problem: i've created a multithreaded app (qtconcurrent) and the sqlite sometimes informes me that database is locked when i am trying to update or insert. I figured out that this is happens because sqlite can not update, insert or delete when another select is in progress. Is there a way to solve this problem? Another question is if i can use postgres to solve problem and not sqlite? I would be really gratefull if anyone has an answer in my problem because i've tried a lot of thinks but nothing worked. Thanks in advance!




  • Lifetime Qt Champion

    Hi,

    Are you using the same connection for each of your thread ?



  • Hi.
    No i am creating new connection everytime qtconcurrent call my function. The creation takes place inside the function.


  • Lifetime Qt Champion

    How are you generating the connection name ?


Log in to reply