Re: finishing sth using Childhandles
- From: Tim.Bunce@xxxxxxxxx (Tim Bunce)
- Date: Mon, 28 Aug 2006 22:15:04 +0100
On Thu, Aug 24, 2006 at 09:47:56AM +0200, Henri Asseily wrote:
Is the below the correct usage for finishing still active child
handles of a dbh?
foreach my $childh (@{$dbh->{ChildHandles}}) {
$childh->finish() if ($childh->{Type} eq 'st');
}
The children of a dbh will always be sth, but the test is harmless.
I'm getting an error when running the above code:
dbih_setup_fbav: invalid number of fields: -1, NUM_OF_FIELDS attribute probably not set right
Looks like a bug (in the driver, I'd guess, but you don't say which)
because calling finish should never need to call dbih_setup_fbav.
But checking for Active will probably avoid the problem:
$_->finish for grep { $_->{Active} } @{$dbh->{ChildHandles}};
Tim.
.
- Follow-Ups:
- Re: finishing sth using Childhandles
- From: Henri Asseily
- Re: finishing sth using Childhandles
- References:
- finishing sth using Childhandles
- From: Henri Asseily
- finishing sth using Childhandles
- Prev by Date: RE: managing updates/versions of DBI on a prod box?
- Next by Date: Re: ANNOUNCE: DBI 1.52 - plus PDF of "What's New" presentation
- Previous by thread: finishing sth using Childhandles
- Next by thread: Re: finishing sth using Childhandles
- Index(es):
Relevant Pages
|