Attributes Property

The Attributes property on a Field object or a Property object in a Properties collection indicates one or more characteristics of an object. This property returns a Long value.

attribute = field.Attribute
 

Remarks

The Attributes property is used to return characteristics of Field objects or Property objects.

For a Field object, the Attributes property is read-only and its value can be the sum of any one or more of the FieldAttributeEnum values. The allowable FieldAttributeEnum values can be one of the following constants:

Enumeration Value Description
adFldMayDefer 0x2 This value indicates that the field is deferred, that is, the field values are not retrieved from the data source with the whole record, but only when you explicitly access them.
adFldUpdatable 0x4 This value indicates that you can write to the field.
adFldUnknownUpdatable 0x8 This value indicates that the provider cannot determine if you can write to the field.
adFldFixed 0x10 This value that the field contains fixed-length data.
adFldIsNullable 0x20 This value indicates that the field accepts Null values.
adFldMayBeNull 0x40 This value indicates that you can read Null values from the field.
adFldLong 0x80 This value indicates that the field is a long binary field. This value also indicates that the AppendChunk and GetChunk methods on the Field object can be used.
adFldRowID 0x100 This value indicates that the field contains some kind of record identifier (record number, unique identifier, and so on).
adFldRowVersion 0x200 This value indicates that the field contains some kind of time or date stamp (often used to track updates).
adFldCacheDeferred 0x1000 This value indicates that the provider caches field values and that subsequent reads are done from the cache.

For a Property object, the Attributes property is read-only and its value can be the sum of any one or more of the PropertyAttributesEnum values. The allowable PropertyAttributesEnum values can be one of the following constants:

Enumeration Value Description
adPropNotSupported 0 This value indicates that the property is not supported by the provider.
adPropRequired 0x1 This value indicates that the user must specify a value for this property before the data source is initialized.
adPropOptional 0x2 This value indicates that the user does not need to specify a value for this property before the data source is initialized.
adPropRead 0x200 This value indicates that the user can read the property.
adPropWrite 0x400 This value indicates that the user can set the property.