Microsoft KB Archive/279828

= Recommendations for Managing Object Class Values in MMS Templates =

Article ID: 279828

Article Last Modified on 1/25/2006

-

APPLIES TO


 * Microsoft Metadirectory Services 2.1
 * Microsoft Metadirectory Services 2.2 Service Pack 1

-



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.



MORE INFORMATION
For additional information, click the article number below to view the article in the Microsoft Knowledge Base:

280046 Unable to Filter Foreign Exports Based on Object Class

Keywords: kbinfo kbenv KB279828

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.