PDA

View Full Version : SQLite connection shared by several threads



jorgegarciar
23rd August 2009, 19:36
Hello,

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,

Jorge-.

tanderson
23rd August 2009, 20:15
look for thread support in qt in assistant. It describes how each thread needs it's own connection.