Recommendations for Managing Object Class Values in MMS Templates (279828)
The information in this article applies to:
- Microsoft Metadirectory Services 2.1
- Microsoft Metadirectory Services 2.2
This article was previously published under Q279828 SUMMARY
There are two peculiarities that you should consider when you are dealing with the multivalued objectclass attribute. These peculiarities are not well documented in Microsoft Metadirectory Services (MMS) versions 2.1, and 2.2.
- When you are accessing object class values in MMS templates, use only the attribute name zcoc as opposed to objectclass. This is required because the object class attribute values are treated specially, and do not follow the expected behavior of any other multivalued attribute in the directory. The zcoc tag will activate the specific routines that are required to manage the MMS objectclass attribute. If you use objectclass instead, the intended result is not achieved, and usually an error code is returned, although this is not guaranteed in every case (such as with $mv.zcoc = zcPerson,Person,Top).
- When you are assigning values from the objectclass attribute of an object to a template variable, the only successful method is to use a simple assignment. In contrast to the normal limitation, in which a template variable can only contain a single value, you can assign the multiple values of the objectclass attribute to a temporary variable by using a simple assignment. Alternatively, if you use the conventional multivalued function I_READ_ATTRIBUTE(), the results are unpredictable. In most cases, the last value that was extracted from the objectclass attribute becomes the only value that is retained by the template variable.
For example, the following statements are valid:
$v_tempVar = $mv.zcoc
-or-
$cd.zcoc = $v_myTempOCVar
In the first case, the variable $v_tempVar might be assigned the value zcPerson,Person,Top. In order that the second example succeed, the value of $v_myTempVar must be something similar to zcDSA,dSA,applicationEntity,Top. Note that in each example, the object classes have the following similarities:
- They are contained within a single line.
- The individual values are separated only by commas (no spaces).
- The values progress from left to right, moving from auxiliary through structural values and always terminating with the abstract object class value, Top.
Modification Type: | Minor | Last Reviewed: | 1/25/2006 |
---|
Keywords: | kbenv kbinfo KB279828 |
---|
|