Description

A simplified method of setting an attribute value.

Return Type

A Boolean value.   A Boolean with True when the attribute value is successfully set.
Failure Returns False.

Failure conditions:
* bad parameter
* security problem

Syntax

object.SetAttribute (pdbnode, sName, eDBATBType, vValue, sOwner, [sLocalized], [lFlagsToOr], [sFmt], [bNewNameWhenExists])

The SetAttribute Method syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type McDataManager.
pdbnodeRequired. A McDBNode object. The McDBNode reference that owns the McDBAttributes collection.
sNameRequired. A String value. McDBType.Name of the attribute value to be stored.
eDBATBTypeRequired. A mcDBAtbType enumeration, as described in settings. McDBType.Type of the attribute value to be stored.
vValueRequired. A Variant value. McDBType.Description to set when a custom attribute is created.
sOwnerRequired. A String value. McDBType.Owner to set when a custom attribute is created.
sLocalizedOptional. A String value. McDBType.Descxription to set when a custom attribute is created.
lFlagsToOrOptional. A Long value. McDBType.Flags will be Ored with the given value when a custom attribute is created.
sFmtOptional. A String value. McDBType.Format to set when a custom attribute is created.
bNewNameWhenExistsOptional. A Boolean value. When an attribute actually exists on pdbnode -- do not overwrite.

Settings

The settings for eDBATBType are:

ConstantValueDescription
 mcdbEmpty1

No value: not valid for defining an McDBAttributeType

 mcdbOther2

A value handled by a module other than McDBLib

 mcdbLong3

A single, integral Long value

 mcdbBlob4

An array of Byte values

 mcdbDate5

A single Date value

 mcdbString6

A single String value

 mcdbDouble7

A single, real numeric (Double) value

 mcdbObject8

An OLE object

 mcdbEnum9

A discrete, pre-defined String Choice value

 mcdbNodeAtb10

A McDBNode, having its own McDBType, but no location in the McDBNode hierarchy

 mcdbArrayDouble11

An array of real, numeric (Double) values

 mcdbArrayLong12

An array of integral Long values

 mcdbArrayString13

An array of String values