FireDAC.Comp.Client.TFDCommand.CommandText

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property CommandText: TStrings read FCommandText write SetCommandTextStrs;

C++

__property CommandText;

Properties

Type Visibility Source Unit Parent
property published
FireDAC.Comp.Client.pas
FireDAC.Comp.Client.hpp
FireDAC.Comp.Client TFDCommand

Description

The text of the SQL command to execute.

FireDAC.Comp.Client.TFDCommand.CommandText inherits from FireDAC.Comp.Client.TFDCustomCommand.CommandText. All content below this line refers to FireDAC.Comp.Client.TFDCustomCommand.CommandText.

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