Michael Peppler
Sybase Consulting
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
Sybase on Linux FAQ
Sybperl FAQ
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: "Wechsler, Steven" <SWechsler at espeed dot com>
Subject: RE: return status in last ct_fetch
Date: Feb 11 2004 4:19PM

> From: Michael Peppler []
> On Wed, 2004-02-11 at 08:06, Wechsler, Steven wrote:
> > Sorry, should have been more specific.
> > 
> > I'm using ct_fetch in an array context, exactly as in your 
> example below.
> > The last ct_fetch (i.e. before an undef is returned) 
> returns a 0 in the
> > first column (probably the only column; haven't checked too 
> carefully).
> Are you fetching the results from a stored procedure?


> My guess is that you are doing this:
> while($dbh->ct_results($restype) == CS_SUCCEED) {
>    next unless $dbh->ct_fetchable($restype);
>    while(@data = $dbh->ct_fetch) {
>       ...
>    }
> }

Actually, I'm not even checking ct_fetchable.

> A stored proc that includes a SELECT will return at least two result
> sets, the first one being the SELECT, and the second (last) one is the
> return status from the proc ($restype == CS_STATUS_RESULT).
> Michael

What's the simplest way to get around retrieving the return status in


CONFIDENTIAL: This e-mail, including its contents and attachments, if any, are confidential. If you are not the named recipient please notify the sender and immediately delete it. You may not disseminate, distribute, or forward this e-mail message or disclose its contents to anybody else. Copyright and any other intellectual property rights in its contents are the sole property of eSpeed, Inc.
     E-mail transmission cannot be guaranteed to be secure or error-free. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission.  If verification is required please request a hard-copy version.
     Although we routinely screen for viruses, addressees should check this e-mail and any attachments for viruses. We make no representation or warranty as to the absence of viruses in this e-mail or any attachments. Please note that to ensure regulatory compliance and for the protection of our customers and business, we may monitor and read e-mails sent to and from our server(s). 

For further important information, please see