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 peppler dot org>
Subject: Re: return status in last ct_fetch
Date: Feb 11 2004 3:33PM

On Wed, 2004-02-11 at 07:20, Wechsler, Steven wrote:
> Is there an easy fix for this? The last retrieval from ct_fetch always gives
> me a 0.

How do you mean that it gives you a 0?

A normal fetch loop goes like this:

while(@data = $dbh->ct_fetch) {
   ...
}
This exits when ct_fetch returns either an undef or a zero length array.
Are you perhaps using "@data" in a scalar context?

Michael
-- 
Michael Peppler                              Data Migrations, Inc.
mpeppler@peppler.org                 http://www.mbay.net/~mpeppler
Sybase T-SQL/OpenClient/OpenServer/C/Perl developer available for short
or long term contract positions - http://www.peppler.org/resume.html