FireDAC.Stan.Option.TFDMapRule.NameMask
Delphi
property NameMask: String read FNameMask write FNameMask;
C++
__property System::UnicodeString NameMask = {read=FNameMask, write=FNameMask};
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
property | published | FireDAC.Stan.Option.pas FireDAC.Stan.Option.hpp |
FireDAC.Stan.Option | TFDMapRule |
Description
Specifies the column name mask.
Use the NameMask property to specify a mask to match column names. The mask uses the LIKE
operator format, where:
- '%' - many symbols
- '_' - a single symbol
If a column name matches the mask, then this column matches the map rule and will get the TargetDataType type. Other properties may be used to make the rule strict.
To use the NameMask property in your application, add a new TFDMapRule:
var
oRule: TFDMapRule;
...
FDTable1.Disconnect;
FDTable1.FormatOptions.OwnMapRules := True;
oRule := FDTable1.FormatOptions.MapRules.Add;
oRule.NameMask := 'column name';
oRule.TargetDataType := dtXxx; // target data type
FDTable1.Open;