Description

Assigns the EnumStrings and EnumValues string and numeric value choices for this McDBAttributeType.

Return Type

None  

Syntax

object.SetEnumChoices newStrings, [newNumerics]

The SetEnumChoices Method syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type McDBAttributeType.
newStringsRequired. A Variant value.

An array of strings that will be allowed as valid choices for this McDBAttributeType.

newNumericsOptional. A Variant value.

An array of [long] numbers that will be allowed as valid choices for this McDBAttributeType.

Remarks

Calling this method will clear any existing string and numeric choice sets associated with this McDBAttributeType. It is only valid to call this method on an McDBAttributeType of Type mcdbEnum.

Exceptions

Error Value Description
CO_E_ATTEMPT_TO_CREATE_OUTSIDE_CLIENT_CONTEXT &H80004024 The Type of this McDBAttributeType is not mcdbEnum.
E_INVALIDARG &H80070057 There are not an equal number of string and long values passed in the parameter arrays or a parameter that is not compatible with an array of longs was passed for the long parameter.
E_UNEXPECTED &H8001FFFF A framework error occurred manipulating this McDBAttributeType.
E_ACCESSDENIED &H80070005 The McDBDatabase.LoggedUser does not have McDBRightsOwner.AttributeTypeAdminRight privileges.
E_PENDING &H8000000A One or more of the newstrings or newvalues is being used by an existing object in the database. It is not valid to change its value while it is being referenced.