Promotic
WikipediaLinkedInYoutubeTwitterFacebook

ExecuteSQL - method of object PmDatabase

Description:
It executes 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.
Syntax:
ExecuteSQL(sSQL As String) As Long
Calling:
n = oDb.ExecuteSQL(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, the method returns the value -1.
If the Technology configurator is set to Access through ODBC and the statement passed successfully, the method returns the value 0. 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, 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 PROMOTIC (MS DAO syntax). See: Description of handling PmDatabase object referencing to existing table.
See also:
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice