[Catalyst] DBI Exception: DBD::SQLite::db prepare_cached failed

Proud Dzambukira proudd at gmail.com
Fri Oct 10 05:00:24 BST 2008


Hi,

I am very new to Catalyst and have found it pretty exciting so far. I have a
very basic "People" database table and whenever I try to run the following
script:


#!/usr/bin/perl

use strict;
use warnings;

use lib qw( lib ../lib );


use Markets::Schema::MarketDB;
use Markets::Model::MarketDB;

# demonstrate picking up database connection info
my $connect_info =3D Markets::Model::MarketDB->config->{connect_info};
print "connecting schema to ".$connect_info->[0]."\n";

# connect to the Catalyst schema
my $schema =3D Markets::Schema::MarketDB->connect( @$connect_info );


# list all People
print "listing all People\n";
my $rs =3D $schema->resultset('People')->search({});
for my $row ( $rs->all ){
  print "\nPerson ". $row->id ."\t - Name " . $row->first_name . "\n";
}

1;

from .../markets/script/test.pl I get the following error:

connecting schema to dbi:SQLite:database
listing all People
DBIx::Class::ResultSet::all(): DBI Exception: DBD::SQLite::db prepare_cached
failed: no such table: people(1) at dbdimp.c line 271 [for Statement "SELECT
me.id, me.first_name, me.last_name FROM people me"] at test.pl line 26

It seems I am successfully connecting but failing to read from my database?
Any ideas what I may be doing wrong? Please help!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20081010/95f07=
91f/attachment.htm


More information about the Catalyst mailing list