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: John Gilmore-Baldwin <john at dwx dot com>
Subject: Re: Can't get rid of "pending results"
Date: Nov 1 1997 10:06PM

It looked like it was returning only one result set in isql.  But I figured
you might be right anyway.  So I broke the query up into two parts, and now
everything works dandy.

Thanks for the advice.

John

>It could be that $select4 returns multiple result sets, and you need
>to call dbresults again. Run that query in isql and see what you get back.
>
>HTH,
>larry
>
>
>On Oct 31, 18:34, John Gilmore-Baldwin wrote:
>> Subject: Can't get rid of "pending results"
>> I've run into a problem that really has me stumped.  At a certain point in
>> my query, I get the following error:
>>
>> DB-Library error:
>>         Attempt to initiate a new SQL Server operation with results pending.
>> Processing text:
>>
>> OK, I figured.  I'll just grab and throw away the results everywhere and
>> all will be well.  Well, no cigar on that idea.
>>
>> I narrowed the problem down to a single statement.  basically, it goes like
>> this:
>>
>> $dbHandle->dbcmdn($select4);
>> $dbHandle->dbsqlexec;
>> $dbHandle->dbresults;
>> while (@data = $dbHandle->dbnextrow) { print "."; };
>> $dbHandle->dbcmdn($select5);
>> $dbHandle->dbsqlexec;
>> $dbHandle->dbresults;
>> while (@data = $dbHandle->dbnextrow) { };
>>
>> I get the error trying to process $select5.