Description
Set or retrieve the value of a particular attribute.
-
Property type
-
A Variant value.
-
Syntax
-
object.Item(Name, [Format]) [= value]
The Item Property syntax has these parts: |
| object | An expression evaluating to an object of type McDBAttributes. | | Name | Required. A String value. The name of the attribute to retrieve or set the value of.
| | Format | Optional. A mcDBDataStyle enumeration, as described in settings. The form of the data to be retrieved, when more than one option is available. The Format mcdbGlobalID will yield a globally unique identifier for any attribute. When the requested attribute is of McDBAttributeType.Type mcdbEnum this parameter determines whether a long or string value is returned. If its McDBAttributeType.Type is mcdbObject, Format indicates the mcDBDataStyle used to return the requested attribute. All values except mcdbGlobalID are ignored when the requested attribute is of any other type, and always ignored when assigning a value. If an invalid value is passed for this parameter, when applicable, the default value for each type is used (mcdbStringData for McDBAttributeType.Type mcdbEnum and mcdbActualObject for type mcdbObject).
| | value | A Variant value. | Settings The settings for Format are:
 | mcdbNoData | 0 | |
 | mcdbDefaultStyle | 1 | |
 | mcdbStringData | 1 |
value as a string
|
 | mcdbStorage | 2 |
returned object implements IStream
|
 | mcdbStream | 3 |
returned object implements IStorage
|
 | mcdbBytes | 4 |
raw byte stream of object
|
 | mcdbProgId | 5 |
the ProgID of the stored object
|
 | mcdbLongData | 6 |
value as a Long (for mcdbEnum attributes only)
|
 | mcdbGlobalID | 7 |
A database-global identifier of the object
|
 | mcdbActualObject | 16 |
An IDispatch to the object, can be Ored with mcdbStorage and mcdbStream
|
Remarks
This property/method will return an empty variant if no attribute with the given Name exists in this collection (i.e. in the owning McDBNode.Attributes). Assigning a value fires the NodeModified event, if it being monitored.
Exceptions
Notes
Attributes may not be retrieved by numeric index. Objects of type mcdbObject that are retrieved as IStorage or IStream objects will lose their backing COM object once all references to its McDBAttributes object and associated McDBNode object are released. Attributes of type mcdbEnum may be assigned either by string or numeric value. However, numeric values must be long, and may need to be explicitly cast (i.e. using the CLng function).
|