Command Text Editor

From RAD Studio
Jump to: navigation, search

Go Up to Database Dialog Boxes

Open this dialog box by clicking the ellipsis [...] in the CommandText field (for example, for TCustomSQLDataSet).

Use this dialog box to construct the command text for dataset components that have a CommandText property. The buttons on the dialog box add SELECT and FROM clauses. Other clauses (WHERE, GROUP BY, HAVING, ORDER BY, and so on) must be added manually to the SQL edit control.

Mobile Tutorial: Using InterBase ToGo with dbExpress (iOS and Android) shows an example of completing the CommandText field with a string rather than constructing it in the Command Text Editor.

Item Description


Displays the names of tables available in the current database. Select a table and click the Add Table to SQL button to add it to the command (SQL statement) displayed in the SQL edit control.

Add Table to SQL

Adds a SELECT clause for the table name selected in the Tables list to SQL edit box.


Displays the names of the columns available in the table currently highlighted in the Tables list. Select one or more columns and click the Add Field to SQL button to add it to the command (SQL statement) displayed in the SQL edit control.To select multiple columns, press CTRL and click the columns. To select a range of columns, press SHIFT and click the first and last columns in the range.

Add Field to SQL

Adds the columns selected in the Fields list to the SELECT clause.


Displays the command (SQL statement) for the CommandText property of the dataset or command component. This statement can be edited manually.

See Also