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

TDataSet.RecordCount

Number of records in the dataset

Declaration

Source position: db.pas line 1730

public property TDataSet.RecordCount : LongInt
  read GetRecordCount;

Description

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

TDataset.RecNo

  

Current record number


Documentation generated on: Jun 22 2020