FireDAC.Stan.Param.TFDMacro.AsRaw
Delphi
property AsRaw: String read GetAsRaw write SetAsRaw;
Contents
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
property | public | FireDAC.Stan.Param.pas | FireDAC.Stan.Param | TFDMacro |
Description
Specifies the value of the TFDMacro when it represents an "as-is" part of a SQL query.
The AsRaw returns a String representation of the value. The value will be substituted into the final SQL command text "as-is" or directly, without any transformations. For example, this is a convenient method to substitute a SQL command phrase, such as WHERE, into the SELECT command.
Example
// If user entered some condition into Edit1, then the content will be substituted into SELECT WHERE FDQuery1.SQL.Text := 'SELECT * FROM Customers {IF !Where} WHERE !Where {FI}'; FDQuery1.MacroByName('Where').AsRaw := Edit1.Text; FDQuery1.Open;