Syntax
| commandobject.CommandType = CommandTypeEnum
CommandTypeEnum = commandobject.CommandType
| ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description
| Sets or returns the CommandTypeEnum type of the Command object.
The CommandType property sets or returns a CommandTypeEnum constant that defines the type of the Command object.
The default is adCmdUnknown. If the specific type declared using the CommandType property does not match the actual type of the Command object, an error will be generated when the Execute method is called.
If you do not specify the type, ADO will need to contact the provider to determine the type of the command. In contrast, if you do specify the type, ADO will usually be able to process the command faster. This is a very simple, yet expedient way to optimize submitting a Command against a data source.
You may also combine the adExecuteNoRecords constant from the ExecuteOptionEnum constants with the adCmdText or adCmdStoredProc constants of the CommandTypeEnum constants to speed up processing.
CommandTypeEnum Constants
ExecuteOptionEnum Constants
| ||||||||||||||||||||||||||||||
See Also
| |||||||||||||||||||||||||||||||
Example
| Set objCommand = Server.CreateObject("ADODB.<span style='color: #004080; font-weight: bold;'>Command</span>") |