E.4. Command Object
The Command object provides a lot of useful functionality for working with the data source. Examples of common operations include retrieving records in a recordset, executing bulk operations, and even manipulating the structure of a database. The flexibility of the Command object is specific to the provider used. Depending on the provider, some properties or methods may generate errors when referenced if the object is not supported.
E.4.1. Properties of the Command Object
The following table lists the various properties of the Command object.
Property | DataType | Description |
---|---|---|
ActiveConnection | String or Connection | Indicates which Connection object the Command object uses. |
CommandStream | Stream object | Stream used as the input for the Command object. |
CommandText | String | Indicates the text of the Command being executed. |
CommandTimeout | Long | Sets the number of seconds a provider will wait for a command to execute. |
CommandType | CommandTypeEnum | Specifies the type of command executed. Values include: adCmdUnspecified, adCmdText, adCmdTable, adCmdStoredProc, adCmdUnknown, adCmdFile, adCmdTableDirect. |
Dialect | GUID | Contains a GUID that represents the dialect of the command text or stream. |
Name | String | Identifies the Command object as a method on the associated Connection object. |
NamedParameters | Boolean | Indicates whether parameter names are passed to the provider. |
Prepared | Boolean | True if the provider should save a compiled version of a Command before execution. |
State | Long | Value that represents if the Command ... |
Get Access™ 2007 VBA Programmer's Reference 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.