Promotic
WikipediaLinkedInYoutubeTwitterFacebook

FillFromInfo - method of object PmgWTable

Description:
Method serves for reading data from general INFO objects that make Pma objects accessible for the designer by the PmaObject.GetInfo method. Either all data are read into the internal table buffer ("static" style) or the table stores the reference to the INFO object ("bind" style), then the INFO object is asked only for a part of the current data on each request for displaying the data (on scrolling, calling the Draw method or on the first drawing).
Syntax:
Empty FillFromInfo(Object Object, String Style)
Calling:
oTable.FillFromInfo(oObject.GetInfo, "static")
Parameters:
Object(Object) Reference to the object of the INFO type that can be get by the PmaObject.GetInfo method and from which the data are read.
Style(String) How the data are read from the INFO object. The values are:
"static" - data from the object are read together and stored into the table on calling this method
"bind" - data from the object are read and stored into the table on calling this method and the data read from the INFO object will be refreshed on the next moving in the table or by calling the Draw method.
Note:
INFO these objects are supported in objects PmaDatabase and PmaDataTable, the data can be read from these two objects.
 
This method is not functional for Web panels.
Example:
There is a PmgWTable object in the panel, and the oDb is the reference to the PmaDatabase object whose data from the "Temperature" table (with 10000 rows) have to be displayed by the PmgWTable object. The PmaDatabase object must be in the open state so that it could provide the data by the FillFromInfo method. The style is "bind", i.e. not all 10000 rows will be read but only those that have to be currently displayed.
VBScriptSelect and copy to clipboard

Dim oDb, oTable
Set oDb = pMe.Pm("/Database")
Set oTable = pMe.Items("/Table")

oDb.Database = "ODBCsource"
oDb.Type = "ODBC"
oDb.Table = "Temperature"
oDb.User = "Admin"
oDb.Password = "Admin"
oDb.Open

oTable.FillFromInfo oDb.GetInfo("data"), "bind"
PROMOTIC 9.0.6 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