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

In reply to Perl 5.8 breaks my DBI proggies!! by elam

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.