TSQLStatement.SQL property
The SQL statement to execute.
Declaration
property SQL:;Description
SQL must be set to the SQL statement to execute. It must not be a
statement that returns a result set. This is the statement that will be
passed on to the database engine when
Prepare is called.
If ParamCheck equals True (the default), the SQL statement can contain
parameter names where literal values can occur, in the form :ParamName.
Keywords or table names cannot be specified as parameters.
If the underlying database engine supports it, the parameter support of
the database will be used to transfer the values from the Params collection. If not, it will be emulated.
The Params collection is automatically populated when the SQL statement is set.
Some databases support executing multiple SQL statements in 1 call.
Therefor, no attempt is done to ensure that SQL contains a single
SQL statement. However, error reporting and the RowsAffected function may be
wrong in such a case.
See also
- ParseSQL
- CheckParams
- Params
- Prepare
- RowsAffected
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
