Re: Again: Can't locate object method "select_row" via package "DBI::st"

[prev] [thread] [next] [Date index for 2005/05/10]

From: Perrin Harkins
Subject: Re: Again: Can't locate object method "select_row" via package "DBI::st"
Date: 21:22 on 10 May 2005
On Tue, 2005-05-10 at 22:18 +0100, wwiersma@xxxxx.xxx wrote:
> sub db_Main() # Stolen from Perrin Harkins

Thief!  How could you?

> {
>   my $dbh;
>     if ( $ENV{'MOD_PERL'} and !$Apache::ServerStarting )
>     {
>         $dbh = Apache->request()->pnotes('dbh');
>     }
>     if ( !$dbh )
>     {
>             $dbh = DBI->connect_cached(
>             $dsn,  $username,
>             $password, {PrintError => 0, RaiseError => 1}
>         );

You aren't passing the rest of the options here, so you are losing the
RootClass one, which causes this error.  Call your _default_attributes
sub and add these two to the hash you get back, then pass them.

- Perrin

Re: Again: Can't locate object method "select_row" via package "DBI::st"
Perrin Harkins 21:22 on 10 May 2005

Generated at 06:54 on 17 May 2005 by mariachi v0.52