in reply to DBI and sqlite concurrency

Can you simply move the db before you start working on it, rendering it unavailable for when you do the transactions?:

use warnings; use strict; use File::Copy; my $db = 'test.db'; my $disabled_db = 'test-locked.db'; move $db, $disabled_db or die $!; # your code here, using $disabled_db in your connect ...

-stevieb

Replies are listed 'Best First'.
Re^2: DBI and sqlite concurrency
by MorayJ (Beadle) on Sep 16, 2015 at 09:39 UTC

    Hi, thanks for this

    I'd still be worried that I was pulling the rug out from under a process that was writing to the database if I moved it

    I'm not sure if FILE::Copy would respect any sqlite locking

    I'm going to add a column and have that called 'transferred' and write 'yes' when done

    Thanks for your help though