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

# TDataSource.OnUpdateData

Called whenever the data in the dataset must be updated

## Declaration

Source position: db.pas line 1937

`published property TDataSource.OnUpdateData : TNotifyEvent read FOnUpdateData write FOnUpdateData;`

## Description

OnUpdateData is called whenever the dataset needs the latest data from the controls: usually just before a TDataset.Post operation. It can be used to copy data from non-db-aware controls to the dataset just before the dataset is posting the changes to the underlying database.

## See also

TDatasource.OnDataChange |  | Called whenever data changes in the current record
TDatasource.OnStateChange |  | Called whenever the state of the dataset changes
TDataset.Post |  | Post pending edits to the database.