> > When attempting to use prepare_cached along with Apache::DBI, it
> > returns this error once it has ran through each of the apache
> > children.
> >
> > [Wed Apr 5 ...] [error] prepare_cached(...) statement handle
> > DBI::st=HASH(0x8296788) is still active at /home/... line ...
>
> You should only be getting that error if there is more data on that
> statement handle that you haven't read. You can take care of that by
> calling $sth->finish, or by reading the rest of the data.
>
> - Perrin
I was getting similar errors when using the RaiseError flag under DBI as
suggested by the perldoc. Posted to dbi-users, and turns out that this is
a known issue that will be fixed in an upcoming DBI release.
As a workarround code something like this should help (if you are using
RaiseError => 1):
eval {
bunch of sqlstatments
}
if($@) {
foreach $handle (keys $dbh->{CachedKids}) {
$handle->finish();
}
}
Hope this is useful.
-Sean
--
Sean Dague
[EMAIL PROTECTED]
There is no silver bullet. Plus, werewolves make better neighbors than
zombies, and they tend to keep the vampire population down.