Name
Command.CommandType Property — (Versions 2.0, 2.1, 2.5, 2.6)
Synopsis
Command
.CommandType =CommandTypeEnum
The CommandType property indicates the current type of Command object.
Datatype
CommandTypeEnum
Description
The CommandType property indicates the type of Command object you are
using. The value of this property can be set to one of the
CommandTypeEnum enumeration values. If the source of the Command
object is a stream (set via the Command.CommandStream property), the
CommandType property must be set to either
adCmdText
or adCmdUnknown
.
In addition, the ExecuteOptionEnum value of
adExecuteNoRecords
can be combined with the
adCmdText
or adCmdStoredProc
constants to improve performance. This value cannot be used with the
Open method of the Recordset object.
If you know the type of Command object that you are using, set this property manually to prevent unwanted delays in performance when ADO tries to figure it out for itself. If the property is set incorrectly, an error is generated upon a call to the Execute method.
See Also
Command.CommandStream, Command.CommandText Property, CommandTypeEnum Enumeration
Get ADO: ActiveX Data Objects now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.