|
|
sybperl-l Archive
Up Prev Next
From: Michael Peppler <mpeppler at peppler dot org>
Subject: Re: Sybase error
Date: Jul 18 2001 1:59PM
Annadurai, Suganya Rani (MLODC, Covansys - CHENNAI) writes:
>
> Hi,
>
> When executing 14 wrapper programs in PERL simultaneously, we are getting
> following error message:
>
> "died: results pending.
> at ../PERL/lib/perl5/site_perl/5.6.0/sun4-solaris/Sybase/DBlib.pm line
> 355>"
>
> The following code is in line 355
> $db->dbcmd($cmd);
> $db->dbsqlexec (Line no:355)
As Stephen says, the problem is in your code:
You must make sure that you *always* call dbresults() in a loop, until
it returns NO_MORE_RESULTS:
$db->dbsqlexec;
while($db->dbresults != NO_MORE_RESULTS) {
while(@dat = $db->dbnextrow) {
....
}
}
Do this even for inserts, stored proc calls, etc, where you don't
expect any rows to be returned, as this can still create more than one
result set.
Michael
--
Michael Peppler - Data Migrations Inc. - http://www.mbay.net/~mpeppler
mpeppler@peppler.org - mpeppler@mbay.net
International Sybase User Group - http://www.isug.com
|