CodeCharge Studio

DataSource->SQL Run-Time Property (PHP)

Applies to

DataSource Object

Type

string

Access

read/write

Syntax

object->DataSource->SQL [=value]

Description

This property stores the main part of a query that retrieves, inserts, updates, or removes data for the form. The main part usually includes the actual SQL command (SELECT, INSERT, UPDATE, DELETE), a list of fields to be retrieved, inserted, or updated and a list of tables from which the data will be retrieved or deleted (FROM) or the name of the table the insert or update operations are to be executed against.
The SQL query is eventually built as the concatenation of SQL, Where and Order properties.
To modify the SQL property (alter the SQL query), you should use the BeforeBuildSelect event procedure of the form.

Examples

Dynamically Modify the SQL Statement,
Dynamically Modify the WHERE and ORDER BY Clauses of a ListBox,
Dynamically Modify the ORDER BY Clause,
Dynamically Modify the WHERE Clause

See Also

DataSource Property
DataSource->CountSQL Property
DataSource->Where Property
DataSource->Order Property


On-line, printable versions and updates