Execute - method of the PmaDatabase object
Description:
It is used to the execution of the SQL statement in the database defined by the
Database property.
This method can be called if the
PmaDatabase object was
connected to the database, for example, by calling the
Connect method.
Syntax:
Long Execute(String sSQL, Long nOptions)
Parameters:
sSQL | (String) Statement in the SQL language syntax |
nOptions | (Long) Mode selection of the statement execution
0 - without alternative possibilities
64 - The SQL statement passed without the syntax correction by the PmaDatabase object. It is possible to enter only if the " Technology" configurator is set to Direct access to table - DAO. See note.
128 - on error in processing the SQL statement it returns the database to the state before calling Execute method |
---|
Note:
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 is set to
Direct access to table - DAO and the
64 constant is used by calling the method):
- then SQL statement in this method must comply with the syntax of the database to which the PmaDatabase object is connected.
Example:
Calling the procedure saved in MS SQL Server database named "proc name"
JavaScriptVBScriptSelect and copy to clipboard
oDb.Execute("EXECUTE proc_name", 64);
oDb.Execute "EXECUTE proc_name", 64