On 2015-09-23 06:09 PM, Richard Hipp wrote:
> On 9/23/15, Michael Schlenker <msc at contact.de> wrote:
>> Hi,
>>
>> i just wondered if there is an API to detect if a sqlite database file
>> is already opened by another process.
> Maybe try to change in or out of WAL mode?  That only works if there
> is a single connection to the database file.

Not sure if that solution improves vastly on the "elegance" of it all, 
but it should work well - might I suggest the server opens the DB simply 
in Read-Only mode?
(This is what I do and never had an issue).

See: https://www.sqlite.org/c3ref/open.html
with: https://www.sqlite.org/rescode.html
and: https://www.sqlite.org/c3ref/db_readonly.html


Reply via email to