TMemDataset.GetRecord function
Gets a record buffer when navigating between rows in the in-memory dataset.
Declaration
function GetRecord(Buffer: TRecordBuffer; GetMode: TGetMode;
DoCheck: Boolean): TGetResult; overrideArguments
Buffer | Stores the values for the record. |
GetMode | Relative record requested in the method. |
DoCheck | No used in the current implementation. |
Function result
Indicates if the operation was successful.
Description
GetRecord is used to get a record buffer when navigating between rows in the in-memory dataset. GetRecord provides a concrete implementation of the abstract virtual method in TDataset.
GetRecord calls MDSReadRecord to retrieve record data which is stored in the Buffer argument. GetRecord ensures that the Bookmark and BookMarkFlag in Buffer are updated to reflect the current record number. GetRecord calls GetCalcFields to derive the values for calculated or lookup fields using the values in Buffer. When Filtered contains True, the MDSFilterRecord method is called to determine if the record values meet the filtering condition.
GetMode specifies the relative record to retrieve in the method, and can contain values like gmCurrent, gmNext or gmPrior. gmCurrent is used when refreshing the record buffer for the record in RecNo.
DoCheck is provided to satisfy the method signature from the ancestor class; it is NOT used in the current implementation.
The return value is a TGetResult type which indicates if the record was successfully retrieved. The return value can contain the following values:
- grOK
- Record was successfully retrieved
- grBOF
- Record requested is beyond the beginning-of-file
- grEOF
- Record requested was beyond the end-of-file (or no records exist)
- grError
- Could not retrieve the record (or it does not meet the filter condition)
GetRecord is used in the implementation of the Next, Prior and Resync methods.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
