Warnings from Ima::DBI

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

From: William McKee
Subject: Warnings from Ima::DBI
Date: 14:21 on 23 Jun 2004
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


This message is actually being generated in the prepare_cached sub in
DBI.pm. Apparently DBI does not like Ima::DBI redefining a sql statment
that has already been used. Is this a problem with my code or Ima::DBI?


Thanks,
William

        -- 
        Knowmad Services Inc.
http://www.knowmad.com

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