in reply to DBI DBD::SQLite unable to open Firefox cookies.sqlite database
This seems to be a simple syntax error. The DSN string is too long:
qq(dbi:SQLite:dbname=$db,'','',{ ...
The qq() extends beyond the first comma, which is not what you want. You want:
qq(dbi:SQLite:dbname=$db),'','',{ ...
Usually, in such situations, I try to separate the steps:
my $dsn = "qq(dbi:SQLite:dbname=$db)"; my $user; my $password; my %dbi_options = ( RaiseError => 1, PrintError => 1, sqlite_open_flags => SQLITE_OPEN_READONLY, ); my $dbh = DBI->connect($dsn, $user, $password, \%dbi_options);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: DBI DBD::SQLite unable to open Firefox cookies.sqlite database
by Discipulus (Canon) on Nov 29, 2022 at 12:09 UTC |