
frznchckn2
New User
Dec 28, 2010, 7:46 PM
Post #3 of 5
(4080 views)
|
|
Re: [FishMonger] Error: file is encrypted or is not a database
[In reply to]
|
Can't Post
|
|
For clarification: If I create a database and populate with sqlite3 I can read the database using perl or sqlite3. If I create a database and populate with perl DBD module, I can only read the data using perl and attempting to access the data via sqlite3 yields the error I described.
#!/usr/bin/perl use DBI qw(:sql_types); my $dbfile = "tmp.db"; my $dbh = DBI->connect("dbi:SQLite:dbname=$dbfile","",""); $sth = $dbh->prepare("CREATE TABLE logicFcns (logicFcnsKey INTEGER PRIMARY KEY, fcn TEXT)") or die $dbh->errstr; $sth->execute() or die $dbh->errstr; $sth = $dbh->prepare("insert into logicFcns (fcn) values ('and_a_b')"); $sth->execute(); $sth = $dbh->prepare("SELECT * FROM logicFcns"); $sth->execute(); my $row = $sth->fetch; my $blobo = $row->[1]; print "$row\n"; print "$blobo\n"; $sth->finish; $rc = $dbh->disconnect or warn $dbh->errstr;
|