FireDAC.Stan.Param.TFDMacro.AsRaw

De RAD Studio API Documentation
Aller à : navigation, rechercher

Delphi

property AsRaw: String read GetAsRaw write SetAsRaw;

C++

__property System::UnicodeString AsRaw = {read=GetAsRaw, write=SetAsRaw};

Propriétés

Type Visibilité  Source Unité  Parent
property public
FireDAC.Stan.Param.pas
FireDAC.Stan.Param.hpp
FireDAC.Stan.Param TFDMacro


Description

Spécifie la valeur du TFDMacro lorsqu'il représente une partie "en l'état" d'une requête SQL.

La propriété AsRaw renvoie une représentation String de la valeur. La valeur est remplacée "en l'état" ou directement sans aucune transformation dans le texte final de la commande SQL. Par exemple, cette méthode est pratique pour remplacer une phrase de commande SQL, telle que WHERE, dans la commande SELECT.

Exemple

// 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;

Voir aussi