How to limit number of rows returned

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Posts: 101
Joined: Tue 01 May 2007 16:36

How to limit number of rows returned

Post by ccmcbride » Thu 25 Sep 2014 19:01

Is it possible to somehow limit the number of rows returned?
I have cases where the user is trying to design reports, so only needs 25 records to do the report design, but needs all records when the report is actually run, so am wondering how to place a limit on the number of records returned from a dynamic query (so I don't know ahead of time which fields or tables are being returned), without requiring them to modify the query manually to select top x records.(error prone, because they may end up leaving it in there)

Posts: 296
Joined: Thu 12 Oct 2006 09:34

Re: How to limit number of rows returned

Post by Ludek » Fri 26 Sep 2014 07:16

automatically generate query like

select top 25 * from (
<< your original query>>
) a


Devart Team
Posts: 998
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: How to limit number of rows returned

Post by azyk » Fri 26 Sep 2014 07:58

At present SDAC does not support this functionality. You can suggest this feature at our UserVoice ( ... components ). If the suggestion gets a lot of votes, we will consider the possibility to implement it.

Post Reply