PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Michael Peppler <mpeppler at MBAY dot NET>
Subject: syb_more_results and stored proc errors in DBD::Sybase 0.08
Date: May 28 1998 10:44PM

Ken Fasman writes:
 > In the script included below, the erroneous parameter passed to sp_who 
 > results in an infinite loop processing the *second* result set.  Am I using 
 > syb_more_results incorrectly, or is a bug in DBD::Sybase 0.08 failing to 
 > reset this flag when an error occurs?

This is a bug.

I'll try to find a moment to fix it...

Michael

 > 
 > Thanks,
 > Ken Fasman
 > WI/MIT Center for Genome Research
 > 
 > ------------------------------------
 > 
 > use DBI;
 > 
 > $dbh = DBI->connect ('dbi:Sybase:my_server', 'my_account', 'my_pswd',
 >                      { PrintError => 0,
 >                        RaiseError => 0 }
 >                      );
 > 
 > if ( !defined $dbh) {
 >     die "Unable to connect to server my_server: $DBI::errstr\n";
 > }
 > 
 > $sth = $dbh->prepare (" exec sp_who 1 ");
 > $sth->execute;
 > print ($sth->errstr) if ($sth->err);
 > 
 > $i = 0;
 > do {
 >     ++$i;
 >     print "Result set $i\n";
 >     print "------------\n";
 >     while ( $hash = $sth->fetchrow_hashref() ) {
 >         foreach $key (keys %$hash) {
 >             print "$key: $$hash{$key}\n";
 >         }
 >     }
 > } while ($sth->{syb_more_results}); 
 > 
 > $sth->finish;
 > 
 > $dbh->disconnect;
 > 
 > exit;
 > 
 > 

-- 
Michael Peppler         -||-  Data Migrations Inc.
mpeppler@datamig.com    -||-  http://www.mbay.net/~mpeppler
Int. Sybase User Group  -||-  http://www.isug.com