How to open an sqlite3 for reading without being blocked by process writing to it?

Peng Yu <[email protected]> Sun, 8 Mar 2020 22:24:05 -0500
Newsgroups gmane.comp.db.sqlite.general
Message-ID <CABrM6wnxT6siDvHnCwBMjBNmJfcpcM7Tad1ukNZX37mkuzs1dw@mail.gmail.com>
When I open an sqlite3 db using the following python code,

conn=apsw.Connection(filepath, flags = apsw.SQLITE_OPEN_READONLY)

, I got the following error.

Traceback (most recent call last):
  File "/xxx.py", line 21, in <module>
    for x in c.execute('SELECT (data) FROM sqlar'):
  File "src/cursor.c", line 236, in resetcursor
apsw.BusyError: BusyError: database is locked

The db file is currently processed by a python script which opens the
db file for writing in the following way.

conn = apsw.Connection(filepath)

Since the first process just reads, I'd like it not be blocked. What
is the correct way to do so? Thanks.

-- 
Regards,
Peng
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users