Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Catalyst: Users

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.

 

 

Catalyst users RSS feed   Index | Next | Previous | View Threaded


ksmclane at us

Apr 26, 2012, 12:05 PM

Post #1 of 2 (178 views)
Permalink
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.

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.


davewood at gmx

Apr 26, 2012, 12:26 PM

Post #2 of 2 (173 views)
Permalink
Re: 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. [In reply to]

$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> 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.
> _______________________________________________
> List: Catalyst [at] lists
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
> Dev site: http://dev.catalyst.perl.org/
>

_______________________________________________
List: Catalyst [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/

Catalyst users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.