[sqlite] Detect if db is already opened by another process?

2015-09-25 Thread Michael Schlenker
Am 23.09.2015 um 18:09 schrieb Richard Hipp: > On 9/23/15, Michael Schlenker 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

[sqlite] Detect if db is already opened by another process?

2015-09-23 Thread Eduardo Morras
On Wed, 23 Sep 2015 18:01:47 +0200 Michael Schlenker wrote: > Hi, > > i just wondered if there is an API to detect if a sqlite database file > is already opened by another process. > > I can make the assumptions that: > > 1. WAL mode is in use > 2. Linux and Windows only > 3. No network

[sqlite] Detect if db is already opened by another process?

2015-09-23 Thread R.Smith
On 2015-09-23 06:09 PM, Richard Hipp wrote: > On 9/23/15, Michael Schlenker 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

[sqlite] Detect if db is already opened by another process?

2015-09-23 Thread Michael Schlenker
Hi, i just wondered if there is an API to detect if a sqlite database file is already opened by another process. I can make the assumptions that: 1. WAL mode is in use 2. Linux and Windows only 3. No network filesystems 4. I only care if the access is done by another SQLite library, not

[sqlite] Detect if db is already opened by another process?

2015-09-23 Thread Simon Slavin
On 23 Sep 2015, at 5:01pm, Michael Schlenker wrote: > i just wondered if there is an API to detect if a sqlite database file > is already opened by another process. Thanks for your use-case and assumptions which makes this far simpler to answer. I don't know of any simple way to know if

[sqlite] Detect if db is already opened by another process?

2015-09-23 Thread Richard Hipp
On 9/23/15, Michael Schlenker 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. > > I can make the