Promotic
WikipediaLinkedInYoutubeTwitterFacebook

Examples of MySQL database usage

MySQL database in the PmaTrendGroup object

- When creating the object from Preconfiguration "PmaTrendGroup - Trend group" the "Storage type" configurator set to: Database MySQL cyclic.
- In a newly created PmaTrendGroup object, on the "Storage" tab, the "Storage type" configurator set to: Database MySQL cyclic.

The trend values can be defined on the "Data" tab or in the ExtTrend of the PmaData object.

If the database files do not exist, then these will be created on first applicagion launch, when calling the Run method (or the RunTime method) of the PmaTrendGroup object. Or automatically by checking the "Automatic saving after launch is enabled" configurator on the "Trend" tab.

MySQL database in the PmaDatabase object

- When creating the object from Preconfiguration "PmaDatabase - Database", select: ODBC; Data source.
- In a newly created PmaDatabase object, on the "Database" tab, set the configurators: Technology, Database (file, folder, data source), Table (file), etc.

MySQL database in the PmaAdo object

- When creating the object from Preconfiguration "PmaAdo - ADO database", select the database type: MySQL and in the "Database connection parameters" configurator select: ODBC - Named ODBC source.
- In the "Database connection parameters" configurator it is necessary to modify the name of ODBC source (eventually user and password).
The PmaAdo object is created, containing the DtiOper method on the "Methods" tab. This method represents the basic inteface for working with database tables and can be used, for example, by the Preconfiguration "Panel with editable table viewer of data source" viewer.
 
The interface uses the ADO technology that can be extended by additional functionality:
Example:
Creates new table data with columns nTime (time, primary key, mustn't be NULL), 'flags' (integer, mustn't be NULL) and 'value1' (real number, mustn't be NULL).
JavaScriptVBScriptSelect and copy to clipboard

pMe.DbExecute("", "CREATE TABLE data (nTime TIMESTAMP PRIMARY KEY, flags INTEGER NOT NULL, value1 FLOAT NOT NULL)", "");
 
See http://dev.mysql.com/doc/refman/5.6/en/index.html, http://www.junext.net/mysql/.

History:
Pm8.02.00: Created
PROMOTIC 9.0.12 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
Navigation:
 
 
- Examples of MySQL database usage
 
 
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice