FireDAC.Stan.Option.TFDFetchMode

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

TFDFetchMode = (fmManual, fmOnDemand, fmAll, fmExactRecsMax);

C++

enum DECLSPEC_DENUM TFDFetchMode : unsigned int { fmManual, fmOnDemand, fmAll, fmExactRecsMax };

Properties

Type Visibility Source Unit Parent
enum public
FireDAC.Stan.Option.pas
FireDAC.Stan.Option.hpp
FireDAC.Stan.Option FireDAC.Stan.Option

Description

Specifies how the result set records must be fetched into FireDAC internal data storage.

Name Description
fmManual

The records are not fetched automatically by FireDAC. A programmer must write code to fetch records at appropriate times, using the following methods:

fmOnDemand The records are fetched automatically by FireDAC when they are required by the navigation or other dataset methods. At each request FireDAC fetches one or more record sets, containing RowsetSize records.

This mode allows to open large result sets without a significant delay, similarly to the fmAll mode. However, the total time of fetching all records is higher than in fmAll mode. For example, the server-side static cursor is used on Microsoft SQL Server.

fmAll All result set records are fetched automatically by FireDAC at the dataset Open call or at the first IADPhysCommand.Fetch call.

On a large result set it may take some time, but navigation through a dataset is fast because all records are stored in a FireDAC internal data storage. For many DBMSs, such as Microsoft SQL Server, MySQL Server, Sybase SQL Anywhere:

  • It releases client result set buffer and allows to execute the next command returning result sets.
  • It gives maximum fetch performance. For example, the fast forward-only cursor is used on Microsoft SQL Server.

See Also