FireDAC.Stan.Option.TFDRecordCountMode

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

TFDRecordCountMode = (cmVisible, cmFetched, cmTotal);

C++

enum DECLSPEC_DENUM TFDRecordCountMode : unsigned int { cmVisible, cmFetched, cmTotal };

Properties

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

Description

Specifies the values used to control how TFDDataSet counts the number of records in the result set.

Name Description
cmVisible

TDataSet.RecordCount returns the number of records currently accessible through the TDataSet navigation interface. For example, all these records are accessible to a user using associated TDBGrid.

  • RecordCount tracks records deleted / appended to the dataset.
  • Is not applicable to TFDTable in the LDV mode.
  • Has no overhead.
  • Gives a convenient value for the end-users.
cmFetched TDataSet.RecordCount returns the number of fetched records at the current time.
  • RecordCount tracks records deleted / appended to the dataset.
  • Is not applicable to TFDTable in the LDV mode.
  • Has no overhead.
  • Gives a current dataset "weight", rather than a convenient value for the end-users.
cmTotal

TDataSet.RecordCount returns the number of records, which will be returned by the command. For this, FireDAC issues SELECT COUNT(*) FROM (<original SQL command text>).

  • RecordCount does not track records deleted / appended to the dataset. To refresh RecordCount, call the TDataSet.Refresh method.
  • Applicable to TADTable in the LDV mode.
  • Has an overhead at the dataset opening.
  • Gives nearly the exact number of records until the dataset records are deleted / inserted.

See Also