Description
Create a new attribute [value] in this McDBAttributes collection.
-
Return Type
-
None
-
Syntax
-
object.Add Name, Type, [value], [Owner]
The Add Method syntax has these parts: |
| object | An expression evaluating to an object of type McDBAttributes. | | Name | Required. A String value. The string name of the attribute type (McDBAttributeType) describing the new attribute [value] to be created. If this name does not indicate a [suggested] attribute (i.e. one in McDBType.Attributes of the McDBNode.Type of the McDBNode owning this collection), a [custom] McDBAttributeType with this Name and
| | Type | Required. A mcDBAtbType enumeration, as described in settings. The mcDBAtbType of the new McDBAttributeType, when a new type is being created (i.e. Name does not indicate an McDBAttributeType defined [suggested] by the parent McDBNode's McDBType). If Name indicates a pre-defined [suggested] McDBAttributeType, this parameter is unused, although some value must be provided.
| | value | Optional. A Variant value. The value to assign to the new attribute. This argument will be coerced to Type, as necessary (and possible). When Type is mcdbNodeAtb, this parameter specifies the McDBType of the newly created attribute McDBNode.
| | Owner | Optional. A String value. The name of the module handling the McDBAttributeType, if a new type is being created. This parameter is unused if the Name passed in argument 1 specifies a pre-defined McDBAttributeType in the owning McDBNode's McDBType.Attributes collection. If this parameter is needed, but not specified, the name of this module ("McDBLib") will be used, which is almost always appropriate anyhow.
| Settings The settings for Type are:
 | mcdbEmpty | 1 |
No value: not valid for defining an McDBAttributeType
|
 | mcdbOther | 2 |
A value handled by a module other than McDBLib
|
 | mcdbLong | 3 |
A single, integral Long value
|
 | mcdbBlob | 4 |
An array of Byte values
|
 | mcdbDate | 5 |
A single Date value
|
 | mcdbString | 6 |
A single String value
|
 | mcdbDouble | 7 |
A single, real numeric (Double) value
|
 | mcdbObject | 8 |
An OLE object
|
 | mcdbEnum | 9 |
A discrete, pre-defined String Choice value
|
 | mcdbNodeAtb | 10 |
A McDBNode, having its own McDBType, but no location in the McDBNode hierarchy
|
 | mcdbArrayDouble | 11 |
An array of real, numeric (Double) values
|
 | mcdbArrayLong | 12 |
An array of integral Long values
|
 | mcdbArrayString | 13 |
An array of String values
|
Remarks
This method may NOT be used to set the value of an existing attribute. However, it MAY be used to create attributes with types not defined in the McDBNode.Type definition. That is, when Name does not specify an McDBAttributeType in the McDBType.Attributes collection of the McDBNode owning this McDBAttributes, the newly created McDBAttributeType is NOT added to the McDBType of the parent McDBNode. It is a custom McDBAttributeType definition. This method will trigger the NodeModified event, if it is being monitored.
Exceptions
|