Class Property (ADODB VBA)

The class Property represents a dynamic characteristic of an ADO object that is defined by the provider. To use a Property class variable it first needs to be instantiated, for example

Attributes

Indicates one or more characteristics of an object.

Use the Attributes property to set or return characteristics of Connection objects, Parameter objects, Field objects, or Property objects. When you set multiple attributes, you can sum the appropriate constants. If you set the property value to a sum including incompatible constants, an error occurs. Remote Data Service UsageThis property is not available on a client-side Connection object.

Name

Indicates the name of an object.

Use the Name property to assign a name to or retrieve the name of a Command, Property, Field, or Parameter object. The value is read/write on a Command object and read-only on a Property object. For a Field object, Name is normally read-only. However, for new Field objects that have been appended to the Fields collection of a Record, Name is read/write only after the Value property for the Field has been specified and the data provider has successfully added the new Field by calling the Update method of the Fields collection. For Parameter objects not yet appended to the Parameters collection, the Name property is read/write. For appended Parameter objects and all other objects, the Name property is read-only. Names do not have to be unique within a collection. You can retrieve the Name property of an object by an ordinal reference, after which you can refer to the object directly by name. For example, if rstMain.Properties(20).Name yields Updatability , you can subsequently refer to this property as yields Updatability , you can subsequently refer to this property as rstMain.Properties("Updatability") .

Type

Indicates the operational type or data type of a Parameter, Field, or Property object. Here you can find possible values for DataTypeEnum.

For Parameter objects, the Type property is read/write. For new Field objects that have been appended to the Fields collection of a Record, Type is read/write only after the Value property for the Field has been specified and the data provider has successfully added the new Field by calling the Update method of the Fields collection. For all other objects, the Type property is read-only.

Value

Indicates the value assigned to a Field, Parameter, or Property variant.

Use the Value property to set or return data from Field objects, to set or return parameter values with Parameter objects, or to set or return property settings with Property objects. Whether the Value property is read/write or read-only depends upon numerous factors — see the respective object topics for more information. ADO allows setting and returning long binary data with the Value property.