Limiting 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: 1
Joined: Mon 06 Feb 2006 21:06

Limiting number of rows returned

Post by tturney » Mon 06 Feb 2006 21:15


Is there a way to limit the number of rows returned per query? I am using the TMSQuery component and for one query it is sometimes trying to return several thousand records and overall performance is degraded accordingly. If there is a setting or statement that I can fetch maybe a few hundred at a time it would really help.

Tom T.

Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Tue 07 Feb 2006 10:04

You can use SELECT TOP 100 ... FROM ... statement. Also you can use FetchAll = False mode, but in this case we strongly recommend to read about this mode limitations in SDAC help.

Post Reply