Hi I am trying to connect to sqlite via perl:
Code:
#! /usr/bin/perl
use LWP::Simple;
use XML::DOM;
use DBI;
...
33my $db = DBI->connect("dbi:SQLite:dbname=/var/db/blog1.db");
34
35$read = $db->prepare("SELECT * FROM blog");
36
37$read->execute($hash->{title});
38my $rows_ref = $sth->fetchall_arrayref;
39print $rows_ref
40
41$db->disconnect;
error:
Code:
DBD::SQLite::db prepare failed: file is encrypted or is not a database(26) at dbdimp.c line 271 at /mnt/sda1/test.sh line 35.
Can't call method "execute" on an undefined value at /mnt/sda1/test.sh line 37.
Thanks,
Ted