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

# TDataSource.OnStateChange

Called whenever the state of the dataset changes

## Declaration

Source position: db.pas line 1819

`published property TDataSource.OnStateChange : TNotifyEvent read FOnStateChange write FOnStateChange;`

## Description

OnStateChange is called whenever the TDataset.State property changes, and the datasource is enabled. It can be used in application code to react to state changes: enabling or disabling non-DB-Aware controls, setting empty values etc.

## See also

TDatasource.OnUpdateData |  | Called whenever the data in the dataset must be updated
TDatasource.OnStateChange |  | Called whenever the state of the dataset changes
TDataset.State |  | Current operational state of the dataset
TDatasource.Enabled |  | Enable or disable sending of events

Documentation generated on: Feb 26 2014