Show: Delphi C++
Display Preferences

FireDAC.Stan.Option.TFDFetchOptions.RecsMax

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property RecsMax: Integer read GetRecsMax write SetRecsMax  stored IsRMS default -1;

C++

__property int RecsMax = {read=GetRecsMax, write=SetRecsMax, stored=IsRMS, default=-1};

Properties

Type Visibility Source Unit Parent
property published
FireDAC.Stan.Option.pas
FireDAC.Stan.Option.hpp
FireDAC.Stan.Option TFDFetchOptions

Description

Controls the maximum number of records to be fetched.

Use RecsMax to limit the number of records to be fetched from a single result set. To change RecsMax for an already prepared dataset, an application must call the Disconnect method first.

FireDAC returns only the first RecsMax records, other records are discarded. The -1 value means - no limit. If combined with Mode = fmExactRecsMax, then FireDAC raises an exception, if the result set has a number of records not equal to RecsMax.  Combining the RecsSkip and the RecsMax properties allows you to implement a result set paging, useful for web applications. Also, an application can use the LIMIT escape function. If both are specified, then the LIMIT has a higher priority. 

Depending on a DBMS, RecsMax and RecsSkip can be translated to a SELECT statement clause (TOP, LIMIT, etc) limiting a result set on a server side. If a DBMS does not support such clauses, then limiting will be performed on a client. 

The default value is -1.

See Also

Personal tools
RAD Studio 10.2 Tokyo
In Other Languages
Previous Versions
Assistance