|
|
sybperl-l Archive
Up Prev Next
From: Michael Peppler <mpeppler at peppler dot org>
Subject: finding out no. of records returned
Date: Apr 12 1999 8:31PM
Adam Witney writes:
> Hello,
>
> previously i used perl to interact with a Sybase ASA v6.0 server through
> ODBC, i could print the number of records returned by a SELECT statement
> using the line
>
> print $sth->rows;
>
> i have now switched to ASE 11.0.3.3 for linux and am using DBD-Sybase and
> DBI, however the above line now always returns -1. Does this line not
> function with the DBI and DBD-Sybase, and if so is there a simple
> equivalent?
DBD::Sybase doesn't know how many rows were returned until all the
rows have been processed.
If it still prints -1 after you've fetched all the rows then you've
uncovered a bug...
Michael
--
Michael Peppler -||- Data Migrations Inc.
mpeppler@peppler.org -||- http://www.mbay.net/~mpeppler
Int. Sybase User Group -||- http://www.isug.com
Sybase on Linux mailing list: ase-linux-list@isug.com
|