V
vishwanathsen03
Hi,
I have installed the perl modules -
DBI
DBD::SQLite
Now I am running a simple perl script that calls sqlite database.
#!/usr/bin/perl
use DBI;
use strict;
my $driver = "SQLite";
my $database = "ex2.db";
my $dsn = "DBI:$driver:dbname=$database";
my $userid = "";
my $password = "";
my $dbh = DBI->connect($dsn, $userid, $password, { RaiseError => 1 })
or die $DBI::errstr;
print "Opened database successfully\n";
Perl script fails on the line that does connect (DBI->connect) with the message -
DBI connect('dbname=ex2.db','',...) failed: database disk image is malformed at perl_sqllite_example1.pl line 11
SQLite and database seems to be fine, I could open/load the database using sqlite3 and I could do insert and select operations.
I could write a C program and I could use the C program to do an insert operation successfully in the database.
So it is the perl to sqlite bridge that has issues....
Kindly suggest.....
Regards,
Vishwanath
I have installed the perl modules -
DBI
DBD::SQLite
Now I am running a simple perl script that calls sqlite database.
#!/usr/bin/perl
use DBI;
use strict;
my $driver = "SQLite";
my $database = "ex2.db";
my $dsn = "DBI:$driver:dbname=$database";
my $userid = "";
my $password = "";
my $dbh = DBI->connect($dsn, $userid, $password, { RaiseError => 1 })
or die $DBI::errstr;
print "Opened database successfully\n";
Perl script fails on the line that does connect (DBI->connect) with the message -
DBI connect('dbname=ex2.db','',...) failed: database disk image is malformed at perl_sqllite_example1.pl line 11
SQLite and database seems to be fine, I could open/load the database using sqlite3 and I could do insert and select operations.
I could write a C program and I could use the C program to do an insert operation successfully in the database.
So it is the perl to sqlite bridge that has issues....
Kindly suggest.....
Regards,
Vishwanath