If I create db with script perl and python after if I try to open db with sqlite I've this error:
Error: file is encrypted or is not a database


This is the script on windows, I use last perl's modules and last sqlite version :
#!c:\perl\bin\perl.exe
use DBI;
use strict;
my $dbh=DBI->connect ("dbi:SQLite:dbname=c:\\sqlite\\dizio.sql") or die "$!";
my $sth = $dbh->do("CREATE TABLE di (indice int, dato char(10))");
my $sth = $dbh->prepare("INSERT INTO di VALUES (?, ?)");
$sth->execute(1, 'ciao');
$sth = $dbh->prepare("select * from di;");
$sth->execute();
while ( my @row=$sth -> fetchrow_array() )
{
print "uno: $row[0], due: $row[1]\n";
}
$dbh -> disconnect();



If I try: sqlite dizionario.sql SQLite version 3.0.4 Enter ".help" for instructions qlite> .databases Error: file is encrypted or is not a database sqlite> .tables Error: file is encrypted or is not a database

But if I open this database with sqlitebrowser I don't have errors. Why sqlite doesn't open it ??? This error is under linux and windows.

Reply via email to