Re: [sqlite] Database is locked when working in 2 processes

2007-01-16 Thread Yuriy Martsynovskyy

This issue has been resolved. I did not call sqlite3_finalize() in the
reader process and kept the READ lock


How to read after the database was written by another process?
Reading function should wait until other process finishes writing and
unlocks the file. But in our case unlocking never happens after
writing is finished.
Only when you restart the reader process in can read again.


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] Database is locked when working in 2 processes

2007-01-16 Thread Yuriy Martsynovskyy

Many threads or process can read, but just one can write, and when is writen
the DB is locked, even for read.


How to read after the database was written by another process?
Reading function should wait until other process finishes writing and
unlocks the file. But in our case unlocking never happens after
writing is finished.
Only when you restart the reader process in can read again.

--
Thanks,
Yuriy Martsynovskyy

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] Database is locked when working in 2 processes

2007-01-16 Thread Cesar Rodas

Many threads or process can read, but just one can write, and when is writen
the DB is locked, even for read.

On 16/01/07, Yuriy Martsynovskyy <[EMAIL PROTECTED]> wrote:


I have a problem with SQLite when accessing DB file from two processes.
Process 1 is writing to the database periodically in autocommit mode.
Process 2 only reads from the same database file. After awhile Process
2 starts getting "Database is locked " error and can not read anymore
until you close and open the process 2 again.

How is such configuration supposed to work in SQLite when we need 1
writer process and 1 or more reader processes?

Working on Windows XP SP2
SQLite 3.3.8 with CppSqlite3 wrapper

--
Thanks,
Yuriy Martsynovskyy


-
To unsubscribe, send email to [EMAIL PROTECTED]

-





--
Cesar Rodas
http://www.sf.net/projects/pagerank (The PageRank made easy...)
http://www.sf.net/projects/fastfs ( The Fast File System)
Mobile Phone: 595 961 974165
Phone: 595 21 645590
[EMAIL PROTECTED]
[EMAIL PROTECTED]