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: Dave Waller <dwaller at precisiondrive dot com>
Subject: Re: DBCOUNT
Date: Nov 27 1998 6:00PM

Is there another way to count the rows before you step through them?

Michael Peppler wrote:

> Dave Waller writes:
>  > I must be using this wrong because I get -1 for the value.
>  >
>  > So..  How do you really use DBCOUNT
> [ I think I'm going to write an autoresponder that replies to DBCOUNT
>   queries automatically... ]
> DBCOUNT() returns the number of rows affected for update/insert/delete
> statements.
> For select statements all the rows need to be processed (via
> dbnextrow) before DBCOUNT() can return the correct value. This is
> normal and is due to the way RDBMS engines handle datasets internally
> (ie the information is not available) This BTW is not a Sybase
> limitation, Oracle works the same way.
> Michael
> --
> Michael Peppler         -||-  Data Migrations Inc.
>       -||-
> Int. Sybase User Group  -||-
> Sybase on Linux mailing list: