D.4. The Command Object
The Command object allows you to do several things. You can query a database and return records in a recordset, execute a bulk operation, or manipulate the database structure. The flexibility of the Command object depends on the provider used. Depending on the provider, some properties or methods might generate errors when referenced.
D.4.1. Properties of the Command Object
The following table lists the various properties of the Command object.
Property | Data Type | Description |
---|---|---|
ActiveConnection | String or Connection | Indicates which Connection object the Command object uses |
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 |
CommandStream | Stream object | Stream used as the input for the Command object |
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 |
Prepared | Boolean | True if the provider should save a compiled version of a Command before execution |
State | Long | Value that represents if the Command object is open, closed, or in the process of connecting, executing, or retrieving information |
NamedParameters | Boolean | Indicates whether parameter names are passed to the provider |
You don't ...
Get Access 2003 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.