OpenSQL - property of the PmaDatabase object
SQL statement of the SELECT
type on open
Property access for read and write
The default value of this property is defined in the "SQL statement during opening
" configurator of this object.
The SQL statement specifies which rows, columns from the table will be read by the object.
The property is used when calling the Open
method only if the "Open table using the SQL statement SELECT
" configurator configurator is checked
. Otherwise the Table
property is used and the whole content of the table is read.
oDb.OpenSQL = "SELECT * FROM Table WHERE MyColumn BETWEEN 10 AND 100";
// ... do something with the query "SELECT * FROM Table ..."
oDb.OpenSQL = "SELECT MyColumn1, MyColumn2 FROM Table WHERE MyColumn1 > 10";
// ... do something with the query "SELECT MyColumn1, MyColumn2 FROM Table ..."