|
|
sybperl-l Archive
Up Prev Next
From: Michael Peppler <mpeppler at peppler dot org>
Subject: Re: NUMBER of affected rows
Date: May 10 2001 2:09PM
Karsten Spakowski writes:
> Hi folks,
>
> I work with the DBI and DBD Module on a Sybase Server 11.9.
>
> After the execution of an select statement, I will check the number of
> affected row,
> but I get always the -1.
Please read the DBI manual, and also the Sybase OpenClient manual.
There is no way for Sybase to know how many rows a select will return
without counting them (i.e. without fetching all the rows). So there
is no way for DBD::Sybase to tell you how many rows a select query
will return - it can only tell you how many rows *were* returned after
the query data was completely processed.
The number of rows affected will only be significant for
insert/update/delete queries.
Michael
--
Michael Peppler - Data Migrations Inc. - mpeppler@peppler.org
http://www.mbay.net/~mpeppler - mpeppler@mbay.net
International Sybase User Group - http://www.isug.com
Sybase on Linux mailing list: ase-linux-list@isug.com
|