Re: Warnings from Ima::DBI

[prev] [thread] [next] [Date index for 2004/06/23]

From: colm-cdbi
Subject: Re: Warnings from Ima::DBI
Date: 14:32 on 23 Jun 2004
On Wed, Jun 23, 2004 at 10:21:25AM -0400, William McKee wrote:
> Hi Tony,
> 
> Sorry for all these messages coming at you; lots of CDBI work happening
> at the office.
> 
> I've got a set_sql statement that contains a complex join with a single
> placeholder. I decided to use the example you gave last week of calling
> sql_queryname to get a statement handle in a select trigger as follows:
> 
> sub trigger__select {
>   my $class = shift;
>   my $sth = $class->sql_total_amount;
>   $sth->execute($class->id);
>   my $hashref = $sth->fetchrow_hashref();
>   $class->total_amount($hashref->{'total_amount'});
> }
> 
> When I go to use this class, I get repeated entries of the following
> message:
> 
> prepare_cached(
>   <my sql statement here>
>   ) statement handle DBIx::ContextualFetch::st=HASH(0x922c99c) still active at /usr/local/lib/perl5/site_perl/5.8.3/Ima/DBI.pm line 391

I think you may just need to call $sth->finish() before you leave your
subroutine - though I may be misunderstanding the problem.

Colm

Warnings from Ima::DBI
William McKee 14:21 on 23 Jun 2004

Re: Warnings from Ima::DBI
colm-cdbi 14:32 on 23 Jun 2004

Re: Warnings from Ima::DBI
William McKee 16:39 on 24 Jun 2004

Re: Warnings from Ima::DBI
Perrin Harkins 16:46 on 24 Jun 2004

Re: Warnings from Ima::DBI
William McKee 17:35 on 24 Jun 2004

Generated at 11:34 on 01 Dec 2004 by mariachi v0.52