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.
Example:
JavaScriptVBScriptSelect and copy to clipboard
var sSql = "Statement in the SQL language syntax";
oDb.ExecuteSQL(sSql);
Dim sSql
sSql = "Statement in the SQL language syntax"
oDb.ExecuteSQL sSql