[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'DB' (#fcl)


Number of records in the dataset


Source position: db.pas line 1735

public property TDataSet.RecordCount : LongInt
  read GetRecordCount;


RecordCount is the number of records in the dataset. This number is not necessarily equal to the number of records returned by a query. For optimization purposes, a TDataset descendent may choose not to fetch all records from the database when the dataset is opened. If this is the case, then the RecordCount will only reflect the number of records that have actually been fetched at the current time, and therefor the value will change as more records are fetched from the database.

Only when Last has been called (and the dataset has been forced to fetch all records returned by the database), will the value of RecordCount be equal to the number of records returned by the query.

In general, datasets based on in-memory data or flat files, will return the correct number of records in RecordCount.

See also



Current record number

Documentation generated on: May 14 2021