Synopsis:
adoRSetCmd(handle,cursor_type,lock_type,options,query_str1[,query_str2...])
Arguments:
handle - The recordset handle.
cursor_type - The type of cursor
lock_type - The locking type
options - Additional options
query_str1 - The query string
[query_str2..] - optional additional text that will be concatenated to make the complete query string..
Description: This function executes a query on the resordset specified by the handle argument. This function is identical to the adoRSetQuery() function except that it waits for the ExecuteComplete event to trigger before waking up the calling task, rather than the FetchComplete event used by the adoRSetQuery() function. The adoRSetCmd() function is usually used for executing queries that do not return any rows of data whereas the adoRSetQuery() function is used when the query will return one or more rows of data.
For a full description of the cursor_type, lock_type and options arguments, see adoRSetQuery().
The actual query string is made up by concatenating all of the remaining arguments (query_str1, query_str2....), but the concatenated query string must not exceed 2047 characters. For example in the following query string is made up from a number of arguments that have been concatenated together in this way:
table_name="customers";
x=adoRSetCmd(handle,adOpenStatic,adLockReadOnly,-1,"create table ",table_name," (name Text, acc_no Integer)");
which is equivalent to the following:
x=adoRSetCmd(handle,adOpenStatic,adLockReadOnly,-1,"create table customers (name Text, acc_no Integer)");
Remember that the maximum number of arguments that can be passed to a DLL library function in the Telecom Engine is 32.
Note that in blocking mode this function relies on the ExecuteComplete event being triggered in blocking mode in order to wake up the calling task.
Returns: Returns 0 upon success or a negative error code. If ADOERR_COMERR is returned, then the underlying ADO error can be obtained by calling adoLastError()