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: ROW_COUNT
Date: Nov 20 2001 6:28PM

Jeffries, Jim J writes:
 > 
 > How do I get a count of the number of rows returned when using
 > Sybase::CTlib?
 > 
 > 
 > Here is my program so far.
 > 
 > #!/usr/local/bin/perl 
 > use Sybase::CTlib;
 > $dbh = new Sybase::CTlib 'user', 'password', 'server';
 > $dbh->ct_execute("select fileid from o_file where fileid = 6077055");
 > print "Rowcount: " , ROW_COUNT, "\n";

See ct_res_info(CS_ROW_COUNT).

However, this will only return valid data for a SELECT clause after
all the rows have been fetched.

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