SeeAlso Properties Methods Events Example
Unit
MySQLDataset
Applies to
TMySQLDataset TMySQLTable and TMySQLQuery components
Declaration
type
TMySQLFieldValue = procedure(Dataset: TMySQLDatasetBase; AField: string; AIndex: int64; var AValue: string) of object;
property OnCustomValue: TMySQLFieldValue;
Description
This event fires for each column and row being received by the dataset from the MySQL server as and when the row is fetched. It allows you to override the values of any row-column value with your own. AField is the MySQL column/fieldname (at the time when this happens TField objects have not yet been created for the dataset), AIndex is the column/field's index, i.e. 0 = first column, 1 = second, .. etc and AValue is the value received which you may change to your own. Be very careful when using this event, remember that MySQL has told the dataset the type of the column already, ex. Integer, so you will receive exceptions if you start putting text into a specific column's values suddenly.