On 14 Sep 2016, at 4:49pm, Alex Ward <cov...@yahoo.com> wrote: > In my original post I said we had done that and it didn’t help, but we just > locked the step, not the prepare/step/finalize so I'm guessing if we lock all > three we will be ok.
It is not enough to lock the _prepare, lock the _step()s, and lock the _finalize. If they're sharing a connection with other threads then the lock has to be placed at the start of the prepare and be released at the end of the finalize. Don't forget that they're all part of the same transaction. This is why you don't generally share a connection between simultaneous threads. If the threads have different connections and you let SQLite handle the locking things work properly. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users