Results 1 to 2 of 2

Thread: SQLite connection shared by several threads

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2009
    Málaga (Spain)
    Qt products
    Unix/X11 Windows

    Unhappy SQLite connection shared by several threads


    I'm using SQLite in an application. I create two threads which will be writting and reading concurrently to and from the same database.

    How do I manage concurrency by using the API of Qt libraries for databases?

    I'm continuoslly receiving messages like: "database is locked Unable to fetch row". Is autocommit done after one-row-inserts automatically? How do I detect the "LOCKED" status?

    Thanks in advance and regards,


  2. #2
    Join Date
    Aug 2009
    Thanked 2 Times in 2 Posts

    Default Re: SQLite connection shared by several threads

    look for thread support in qt in assistant. It describes how each thread needs it's own connection.

  3. The following user says thank you to tanderson for this useful post:

    jorgegarciar (23rd August 2009)

Similar Threads

  1. Threads and database connection
    By probine in forum Qt Programming
    Replies: 9
    Last Post: 7th August 2013, 08:30
  2. How can I send a SQLite :memory: database connection ?
    By georgep in forum Qt Programming
    Replies: 4
    Last Post: 20th July 2009, 12:07
  3. QT - SQLite Connection
    By sabeesh in forum Qt Programming
    Replies: 14
    Last Post: 3rd June 2009, 13:58
  4. Replies: 4
    Last Post: 29th December 2008, 19:50
  5. Client/Server Error: BadIDChoice
    By 3nc31 in forum Qt Programming
    Replies: 5
    Last Post: 27th November 2007, 10:22

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.