Promotic
WikipediaLinkedInYoutubeTwitterFacebook

OpenSQL - property of object PmDatabase

Description:
SQL statement of the SELECT type on open
Syntax:
OpenSQL As String
Calling:
s = oDb.OpenSQL
Note:
Property access for read and write. The preset value of this property is defined in the SQL statement configurator of this object. The SQL statement defines which rows, columns from the table(s) will be read by the object.

The property is used by calling the Open method only when the "Open using the SQL statement SELECT" configurator is checked. Otherwise the Table property is used and the whole content of the table is read.

See also:
Example:
The "Open using the SQL statement SELECT" configurator is checked
If oDb.IsOpen Then
  oDb.CloseTable
End If
oDb.OpenSQL = "SELECT * FROM Table WHERE column BETWEEN 10 AND 100"
oDb.Open
'... Do something SELECT * FROM Table ...
oDb.OpenSQL = "SELECT column1, column2 FROM Table WHERE column1 > 10"
oDb.Open
'... Do something
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice