<br>
<table width=100%>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">From:</font>
<td><font size=1 face="sans-serif">David Schmidt <davewood@gmx.at></font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">To:</font>
<td><font size=1 face="sans-serif">The elegant MVC web framework <catalyst@lists.scsys.co.uk></font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">Date:</font>
<td><font size=1 face="sans-serif">04/26/2012 02:27 PM</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">Subject:</font>
<td><font size=1 face="sans-serif">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.</font></table>
<br>
<hr noshade>
<br>
<br>
<br><tt><font size=2>$rs->all returns an array so you should call it
in list context like this.<br>
<br>
$c->stash(<br>
accounts => [ $c->model('ORANGES::AccountView')->all ]<br>
);<br>
<br>
no idea if that changesyour error msg but it is a start.<br>
<br>
david<br>
<br>
On 26 April 2012 21:05, Kenneth S Mclane <ksmclane@us.ibm.com> wrote:<br>
> I do not understand this error at all. It is tacking the DB user name
onto<br>
> the model name. Any hints why this is happening?<br>
><br>
> This is my list sub:<br>
><br>
> sub list :Local {<br>
> my ($self, $c) = @_;<br>
> $c->stash(accounts => $c->model('ORANGES::AccountView')->all);<br>
> $c->stash(template => 'accountview/list.tt2');<br>
> }<br>
><br>
> The model exists, if I remove the "->all" I get a different
error but at<br>
> least the stash gets populated with a bunch of info ABOUT the model,
not the<br>
> actual data. With it left in I never get anything but the error.<br>
><br>
> Any help appreciated.<br>
</font></tt>
<br><tt><font size=2>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.</font></tt>
<br><tt><font size=2><br>
</font></tt>
<br>
<br>