ADSI Not Retrieving Multivalued Attributes Correctly for Dynamic Users
ID: Q248768
|
The information in this article applies to:
-
Microsoft Site Server version 3.0
SYMPTOMS
Dynamic multivalued string attributes do not support duplicate entries. For example, storing the values "1" "2" "2" will on read only return "1" "2". In other words, entries with the same value are only stored once.
CAUSE
This is by design.
RESOLUTION
If you change the Schema of the Membership Directory so that the isSearchable attribute of the multivalue attribute entry is set to 0, this allows duplicate entries to be stored in dynamic multivalued string attributes.
The following example code shows how to do this for the sample attribute named MultiValueAttribute.
Dim adsLDAP
Dim adsMembersContainer
Dim adsMember
Dim I
' Connect to the members container
Set adsLDAP = GetObject("LDAP:")
Set adsMembersContainer = adsLDAP.OpenDSObject( _
"LDAP://" & g_strLDAPServerName & ":" & g_strLDAPPortNumber & "/o="
& g_strLDAPOrganizationName & _
"/ou=Admin/cn=Schema", _
g_strAdministratorDN, g_strAdministratorPassword, 0)
' Get the member information and attributes
Set adsObject = adsMembersContainer.GetObject("attributeSchema",
"cn=MultiValueAttrib")
adsObject.Put "isSearchable",0
adsObject.SetInfo
' Perform cleanup
Set adsMember = Nothing
Set adsMembersContainer = Nothing
Set adsLDAP = Nothing
Additional query words:
Keywords :
Version : winnt:3.0
Platform : winnt
Issue type : kbprb