I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2009-06-22 21:57:35-07 by supercraig
Trying to debug an SQLite error
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); } }
Direct Responses: Write a response