elam has asked for the wisdom of the Perl Monks concerning the following question:

Hi all, We've recently upgraded a server to Redhat 9.0 at work, and by default it installs Perl 5.8. We are also using java and perl to access a proprietary database through jdbc and DBI::jdbc. None of my DBI programs work now though. One of the problems was having a query as such:
my $sthHandle = $dbh->prepare("SOME QUERY"); $sthHandle->execute() or die "$DBI::errstr"; while(my ($VALUE) = $sthHandle->fetchrow_array()) { my $sthHandle2 - $dbh->prepare("SOME QUERY"); $sthHandle2->execute() or die "$DBI::errstr"; while( my ($VALUE) = $sthHandle2->fetchrow_array()) { print "$VALUE"; } }
If I ran this code as is I get a:
panic: DBI active kids (2) > kids (1) at /usr/lib/perl5/site_perl/5.8. +0/DBD/JDBC.pm line 890.
along with:
DBI handle cleared whilst still active at ./dbProgram.pl.bak line 160. dbih_clearcom (sth 0x844d930 0x8478d30, com 0x8478ee0, imp DBD::JD +BC::st): FLAGS 0x115: COMSET Active Warn PrintError PARENT DBI::db=HASH(0x82e004c) KIDS 0 (0 Active) IMP_DATA undef NUM_OF_FIELDS 1 NUM_OF_PARAMS 0
It looks like I can't have two calls to a database at the same time. If I put all the data into a data structure and then call the other query, then everything is ok.
Although there are some situations where I have a single call to a db and it does this as well.
Googling for the 'DBI kids' didn't really turn up anything useful, so I was wondering if anyone else had these problems.
Thanks,

Elam

Replies are listed 'Best First'.
Re: Perl 5.8 breaks my DBI proggies!!
by simonm (Vicar) on Aug 14, 2003 at 17:29 UTC
    You've probably already done this, but make sure that you've recompiled the C/XS portions of any Perl modules you're using, including DBI... Differences in Perl's internal functions can cause old libraries to fail or malfunction.
Re: Perl 5.8 breaks my DBI proggies!!
by jdtoronto (Prior) on Aug 14, 2003 at 18:46 UTC
    A good place to ask also would be the DBI/DBD users mailing list, you can subscribe by email at:

    dbi-users-subscribe@perl.org

    You will find the module authors a generally monitoring that list.

    jdtoronto