From RAD Studio API Documentation
Jump to: navigation, search


property CommandText: TStrings read FCommandText write SetCommandTextStrs;


__property System::Classes::TStrings* CommandText = {read=FCommandText, write=SetCommandTextStrs};


Type Visibility Source Unit Parent
property public
FireDAC.Comp.Client TFDCustomCommand


The text of the SQL command to execute.

The CommandText sets/gets:

  • The text of SQL command to execute.
  • The name of the stored procedure to execute, if CommandKind is in [skStoredProc, skStoredProcWithCrs, skStoredProcNoCrs].

After setting CommandText, FireDAC will execute the following actions for non-stored procedures:

If you add a long command, using the CommandText.Add method, then it is recommended to call CommandText.BeginUpdate before the command modification and CommandText.EndUpdate after finishing the command modification.

Later, when Prepare is called, the command text will be preprocessed and transformed into a target DBMS command. See the chapter Preprocessing Command Text for details about FireDAC macros and escape sequences - preprocessor instructions.

See Also