Promotic

ExecuteSQL - method of the PmaDatabase object

Description:
It executes the SQL statement in the database defined by the Database property.
The method can be called if the PmaDatabase object was connected to the database, for example, by calling the Connect method.
Syntax:
Long ExecuteSQL(String sSQL)
Parameters:
sSQL(String) Statement in the SQL language syntax
Note:
By this method the statement that returns the set of rows (e.g. the SELECT statement), can't be executed.
If the statement failed, then the method returns the -1 value.
If the "Technology" configurator is set to Access through ODBC and the statement passed successfully, then the method returns the 0 value.
The SQL statement in the method must comply with the syntax of the database to which the object is connected.
If the "Technology" configurator is set to Direct access to table - DAO, then the method returns the number of modified rows in the database table by the statement.
The SQL statement in the method must comply with the SQL syntax used in the PROMOTIC system (MS DAO syntax).
See: Description of handling PmaDatabase object referencing to existing table.
See also:
Example:
JavaScriptVBScriptSelect and copy to clipboard

var sSql = "Statement in the SQL language syntax";
oDb.ExecuteSQL(sSql);
PROMOTIC 9.0.27 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r.o.