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 during opening" configurator of this object. The SQL statement specifies which rows, columns from the table(s) will be read by the object.

The property is used by calling the Open method only if 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:
"Open using the SQL statement SELECT" configurator is checked
VBScriptSelect and copy to clipboard

If oDb.IsOpen() Then
  oDb.CloseTable
End If

oDb.OpenSQL = "SELECT * FROM Table WHERE MyColumn BETWEEN 10 AND 100"
oDb.Open
'... do something with the query "SELECT * FROM Table ..."
oDb.CloseTable

oDb.OpenSQL = "SELECT MyColumn1, MyColumn2 FROM Table WHERE MyColumn1 > 10"
oDb.Open
'... do something with the query "SELECT MyColumn1, MyColumn2 FROM Table ..."
PROMOTIC 8.3.27 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice