Your application needs to handle the synchronization logic since there is no DB server to do it for you. When you get a busy check you can pause for a short time and relaunch the query.

Mark Riehl wrote:
I'm running SQLite 3.4.1 under Linux.  I have a C++ application that
inserts records into the database.

During testing, I lauch the C++ app and I start sqlite3 from a console
and open the database that is being written to by the C++ application.
 I perform selects using sqlite3 (no inserts) to look at the collected
data and occasionally get "Error: database is locked".  Sometimes get
the error a few times in a row, other times, it doesn't happen at all.

I'm not inserting a lot of records - worst case, there are ~25 records
per second.

Am I just getting lucky and issuing selects at the same time I'm
writing from the other process?  I'm planning on using a web-based app
to periodically poll the database (to provide summary information)
while the C++ app performs the inserts.  What is the best way to
reduce/minimize the lock issue?

Thanks for the help,
Mark

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



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

Reply via email to