Execute - method of object PmDatabase

It is used to the execution of the SQL statement in the database defined by the Database property. The method can be called if the PmDatabase object was connected to the database, for example, by calling the Connect method.
Execute(sSQL As String, nOptions As Long) As Long
n = oDb.Execute(sSQL, nOptions)
sSQL(String) Statement in the SQL language syntax
nOptions(Long) Mode selection of the statement execution
0 - without alternative possibilities
pmcDbSQLPassThrough - The SQL statement passed without the syntax correction by the PmDatabase object. It can be entered only if the Technology configurator is set to Direct access to table - DAO. See the note below.
pmcDbFailOnError - on error in processing the SQL statement it returns the database into the state before calling the Execute method
By this method the SQL statement that returns the set of rows (e.g. the SELECT statement), can't be executed.
If the Technology configurator is set to Access through ODBC (or it is set to Direct access to table - DAO and the pmcDbSQLPassThrough constant is used by calling the method):
- then SQL statement in the method must comply with the syntax of the database to which the PmDatabase object is connected.
- otherwise SQL statement in the method must comply with the SQL syntax used in MS DAO. See: Description of handling PmDatabase object referencing to existing table.
See also:
Calling the procedure saved in MS SQL Server named proc name
VBScriptSelect and copy to clipboard

oDb.Execute "EXECUTE proc_name", pmcDbSQLPassThrough
PROMOTIC 8.3.30 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