On 25 Dec 2014, at 3:17am, Keith Medcalf <kmedc...@dessus.com> wrote:

> Using a separate connection for the INSERT/COMMIT also will not work because 
> it will not be able to get a write lock while the select is running.

Should some part of the library then be producing an error which can be trapped 
?  Would correctly implementing the exception handling described here

<https://www.python.org/dev/peps/pep-0249/#exceptions>

have caught an error message of some sort ?

> The issue can be resolved by:
> (a) moving the commit out of the loop;
> (b) retrieving the whole resultset before running the loop; or,
> (c) changing the journal_mode to WAL (using an on-disk database) and using a 
> separate connection for the INSERT/COMMIT in the loop.

(d) Using the INSERT ... SELECT command rather than a loop.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to