I have 100K insertions made to the database. Out of them I want to have 200 insertions in the form of temp DB and then I make remaining insertions in second step.
For this I was using begin-commit
like below
begin
200 insertions (scanning USB and inserting)
commit
begin
99800 insertions (scanning USB and inserting)
commit
I am also reading from a separate thread. But I stuck into the problem of Getting database locked even for read operation from my application thread and I start getting 'database locked error'. Once the syncing completes and final commit happens, everything becomes normal.
I have read almost all locking and transaction documents on sqlite.org but still no solution. So is there any alternative to what I am trying to achieve?
Aucun commentaire:
Enregistrer un commentaire