Commandtext, recordsaffected, options
Parameters
A commandtext string that contains the SQL statement, table name, stored procedure, or text of a specific provider.
Recordsaffected (optional) number of records affected by the operation returned by the provider for a long integer variable.
Options (optional) long integer value, indicating how the provider calculates the commandtext parameter. The following values can be used:
Constant description
Adshorttext indicates that the provider should calculate commandtext according to the command text definition.
Adcmdtable indicates that ADO should generate an SQL query so that all rows can be returned from the commandtext table.
Adcmdtabledirect instructs the provider to return all rows from the commandtext table.
Adcmdtable indicates that the provider should calculate commandtext Based on the table name.
Adcmdstoredproc indicates that the provider should calculate commandtext Based on the stored procedure.
Adcmdunknown indicates that the command type in commandtext is unknown.
Adasyncexecute indicates that the command should be executed asynchronously.
Adasyncfetch indicates the asynchronous extraction of the remaining rows after the initial quantity specified by the cachesize attribute.
====================
Recordsaffected is of the [out] type. Returns the number of rows affected by this operation.
This is useful when processing changes if they exist and inserts if they do not exist.
Example:
Int affected = 0;
Con. Execute (L "Update...", & affected); // because update does not produce a primary key constraint error, update first
If (affected = 0)
Con. Execute (L "insert ")