|
So, when I run the PRAGMA to check my SQLite database, everything checks out.
When attempted to run a "show tables" from within perl, I get the following error:
dbih_setup_fbav: invalid number of fields: 0, NUM_OF_FIELDS attribute probably not set right at pro
+jectory.cgi line 1597.
But when I check the database file, everything is fine:
rintintin> sqlite3 projectory.sqlite3
SQLite version 3.6.15
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> PRAGMA integrity_check;
ok
sqlite> .exit
The prepare statement it's failing on is in the section subroutine here:
sub getDBConnection
{
$dbh = DBI->connect("dbi:SQLite:dbname=projectory","","") or die "$DBI::errstr\n";
}
sub getTables{
my $_sth = $dbh->prepare ("show tables");
$_sth->execute ();
while (my ($_tableName) = $_sth->fetchrow_array ()) {
push (@tables, $_tableName);
}
} |