[freetds] Count number of row in a result
freddyz77 at tin.it
Mon Jan 26 15:30:51 EST 2004
Il lun, 2004-01-26 alle 18:45, Mattias Webjorn Eriksson ha scritto:
> I want to know how many rows a query returns before I process it.
> Is there a way to determine how many rows a SELECT query returns when
> using dblib, just like dbnumcols()?
> I can't find it any function like that i the refernce manual nor when
> searching on the web.
> Mattias W E
Just change database system :)
Well, it's not really a yoke, simply you can't... sql server return row
counts only after fetching rows. There are however some workaround:
- execute another statement to compute rows numbers (just issue "select
count(*) from table" before "select * from table")
- cache all data (very bad).
More information about the FreeTDS