Limiting the # of rows returns by a query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

ADO Classic had a MaxRecords property the allowed you to limit the number of
rows being return by a query. If there is a similiar property in ADO.NET and
if so, where is it?
 
Thank you Cor. I was afraid of that. I hope MS considers adding the feature
back into ADO because the "Select top X" only works if your allowed to
execute a "SELECT" statement against the database or if your RDMS allows it
(as noted below). In my case, everything must be by a stored procedure and we
need to dynamically limit the number of rows being returned.
 
(as noted below). In my case, everything must be by a stored procedure and
we
need to dynamically limit the number of rows being returned.

In which case, have a look at "SET ROWCOUNT"
 
That would work, except that we would have to recode over 500 stored
procedures and 100+ routines to add an additional parameter to set the
rowcount property dynamically.

Just a thought, is there a way to set the rowcount property in SQL Server
 
Just a thought, is there a way to set the rowcount property in SQL Server
on the database level so that all queries are limited to returning a
particular number of rows?

I don't think so...
 
Back
Top