elam has asked for the wisdom of the Perl Monks concerning the following question:
If I ran this code as is I get a: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"; } }
along with:panic: DBI active kids (2) > kids (1) at /usr/lib/perl5/site_perl/5.8. +0/DBD/JDBC.pm line 890.
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.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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl 5.8 breaks my DBI proggies!!
by simonm (Vicar) on Aug 14, 2003 at 17:29 UTC | |
|
Re: Perl 5.8 breaks my DBI proggies!!
by jdtoronto (Prior) on Aug 14, 2003 at 18:46 UTC |