FireDAC.Stan.Option.TFDFetchOptions.RecordCountMode
Delphi
property RecordCountMode: TFDRecordCountMode read GetRecordcountMode
C++
__property TFDRecordCountMode RecordCountMode = {read=GetRecordcountMode, write=SetRecordCountMode, stored=IsRCMS, default=0};
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
property | published | FireDAC.Stan.Option.pas FireDAC.Stan.Option.hpp |
FireDAC.Stan.Option | TFDFetchOptions |
Description
Controls how to count records in a result set.
Use the RecordCountMode property to control how the TFDDataSet counts the records in the result set.
Mode |
Description |
---|---|
|
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 returns the number of fetched records at the current moment.
|
|
RecordCount returns the number of records, which will be returned by the command. For this, FireDAC issues SELECT COUNT(*) FROM (<original SQL command text>).
|
The default value is cmVisible
.
Note: MySQL may return the "Commands out of sync; you can't run this command now" error when RecordCountMode =
cmTotal
. In this case, either set Mode tofmFetchAll
or do not usecmTotal
.