EPUB | CHM | PDF

TPSQLQuery.Properties.SQL

Top Previous Next

Contains the text of the SQL statement to execute for the query.

Syntax:

property SQL: TStrings;

Description:

Use SQL to provide the SQL statement that a query component executes when its ExecSQL or Open method is called. At design time the SQL property can be edited by invoking the String List editor in the Object Inspector.

The SQL property may contain only one complete SQL statement at a time. In general, multiple "batch" statements are not allowed unless a particular server supports them.

The SQL statement in the SQL property may contain replaceable parameters, following standard SQL-92 syntax conventions. Parameters are created and stored in the Params property.

See also: Example: SQL,ExecSQL