Skip to content

TSQLQuery.SQL

The SQL statement to execute.

Declaration

Source position: sqldb.pp line 717

published property SQL;

Description

SQL is the SQL statement that will be executed when ExecSQL is called, or Open is called. It should contain a valid SQL statement for the connection to which the TSQLQuery component is connected. SQLDB will not attempt to modify the SQL statement so it is accepted by the SQL engine.

Setting or modifying the SQL statement will call UnPrepare

If ParseSQL is True, the SQL statement will be parsed and the Params property will be updated with the names of the parameters found in the SQL statement.

See also Using parameters.

See also

Name Description
TSQLQuery.ParseSQL Should the SQL statement be parsed or not.
TSQLQuery.Params Parameters detected in the SQL statement.
TCustomSQLQuery.ExecSQL Execute a SQL statement that does not return a result set.
TDataset.Open Activate the dataset: Fetch data into memory.