Sign in Join
FPDoc Onlineexperiment

TDataSet.Refresh procedure

Member of TDataSetpublicIn unit DB

Refresh the records in the dataset.

Declaration

pascal
procedure Refresh

Description

Refresh posts any pending edits, and refetches the data in the dataset from the underlying database, and attempts to reposition the cursor on the same record as it was. This operation is not supported by all datasets, and should be used with care. The repositioning may not always succeed, in which case the cursor will be positioned on the first record in the dataset. This is in particular true for unidirectional datasets. Calling Refresh results in the triggering of the BeforeRefresh and AfterRefresh events.

Errors

Refreshing may fail if the underlying dataset descendent does not support it.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.