FireDAC.Comp.Client.TFDCustomCommand.CommandText

From RAD Studio API Documentation
Jump to: navigation, search

[–] Properties
Type: property
Visibility: public
Source:
FireDAC.Comp.Client.pas
FireDAC.Comp.Client.hpp
Unit: FireDAC.Comp.Client
Parent: TFDCustomCommand

Delphi

property CommandText: TStrings read FCommandText write SetCommandTextStrs;

C++

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

Description

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