John Stanton wrote:
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 think he is saying that he is getting the errors in the sqlite3 command shell, not in his application.

To fix that you should issue a .timeout 1000 command in the shell when you open it. That will cause a query to wait up to one second (1000 ms) if the database is locked by your application when it is writing.

HTH
Dennis Cote


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

Reply via email to