[Catalyst] DBIx::Class::ResultSet::all(): DBI
Exception: DBD::DB2::db
prepare_cached failed: [IBM][CLI Driver][DB2/AIX64] SQL0204N
"DBUSERNAME.ACCOUNT_VIEW" is an undefined name.
Kenneth S Mclane
ksmclane at us.ibm.com
Thu Apr 26 20:16:19 GMT 2012
From:
David Schmidt <davewood at gmx.at>
To:
The elegant MVC web framework <catalyst at lists.scsys.co.uk>
Date:
04/26/2012 02:27 PM
Subject:
Re: [Catalyst] DBIx::Class::ResultSet::all(): DBI Exception: DBD::DB2::db
prepare_cached failed: [IBM][CLI Driver][DB2/AIX64] SQL0204N
"DBUSERNAME.ACCOUNT_VIEW" is an undefined name.
$rs->all returns an array so you should call it in list context like this.
$c->stash(
accounts => [ $c->model('ORANGES::AccountView')->all ]
);
no idea if that changesyour error msg but it is a start.
david
On 26 April 2012 21:05, Kenneth S Mclane <ksmclane at us.ibm.com> wrote:
> I do not understand this error at all. It is tacking the DB user name
onto
> the model name. Any hints why this is happening?
>
> This is my list sub:
>
> sub list :Local {
> my ($self, $c) = @_;
> $c->stash(accounts => $c->model('ORANGES::AccountView')->all);
> $c->stash(template => 'accountview/list.tt2');
> }
>
> The model exists, if I remove the "->all" I get a different error but at
> least the stash gets populated with a bunch of info ABOUT the model, not
the
> actual data. With it left in I never get anything but the error.
>
> Any help appreciated.
No, I have tried it both ways and get the same error. I think my problem
may stem from DB2 itself. I am working with a copy of the production
schema. I started out testing against the default and had it working. I am
able to specify the schema I want in my myapp_create model command, and
have verified it is dumping the correct one. I think it may have to do
with the db alias not being setup for this particular schema, so I'm going
to research how to create one that points at the particular one I need.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20120426/77a8e685/attachment.htm
More information about the Catalyst
mailing list