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

# ChangeDataSource

Performs actions needed when the datasource in a control with the specified data link is changed.

## Declaration

Source position: dbctrls.pp line 1535

`procedure ChangeDataSource(`
`AControl: TControl;`
`Link: TDataLink;`
`NewDataSource: TDataSource`
`);`

## Arguments

`AControl` |  | Control notified in the routine.
`Link` |  | Data link updated in the method.
`NewDataSource` |  | Datasource assigned to the data link in the method.

## Description

ChangeDataSource ensures that free notification messages are performed for the datasource in Link and the control in AControl. The value in NewDataSource is assigned to the DataSource property in Link.

## See also

TDataLink.DataSource