SeeAlso Properties Methods Events Example
Unit
MySQLDataset
Applies to
TMySQLDataset TMySQLTable and TMySQLQuery components
Declaration
TMySQLMacroEvent = procedure(Dataset: TMySQLDatasetBase; AMacro: string; var AValue: string; var ADefault: boolean) of object;
property OnMacro: TMySQLMacroEvent;
Description
This event fires each time just before a dataset needs to resolve a macro in any SQL property. The Dataset is the dataset which is trying to resolve the macro, the AMacro is the name of the macro, AValue is an empty string and you may change it to your own value. ADefault's value is True, but if you change it to False, then the default procedure of resolving a macro won't be followed and your value (or an empty string if you have not changed AValue) will be used to to replace the macro in the SQL being resolved. Please see Macros/Params for more details.