I'm considering...
package KQI::Utils::SQLiteWrapper;
use strict;
use warnings;
use Data::Dumper;
use DBI;
use Carp qw(confess);
sub new {
my ( $pkg, $path, $attr, $count) = @_;
$pkg = ref($pkg) if ref($pkg);
my %attr = (
'RaiseError' => 1,
'AutoCommit' => 1,
At the app level you can do something like this to check for the
"database is locked(5)" error. Note the sleep and max ~1000 attempts
functionality as well.
my $ct = 0;
while( $ct++ < 1000 ){
$dbh->do($sql, {}, @bind);
if( $dbh->err == 5 ){ # If got a locked code, try again
sleep 1;
n
Hi all
I'm a Perl programmer using SQLite
I want to retry to execute every command automatically, until the DB
is not locked. In C seems that I need to set the busy_handler.
How do I do this with DBD in Perl?
Thanks for any help
Best Regards
Marcos Rebelo
--
Marcos Rebelo
http://oleber.freeh
3 matches
Mail list logo