Registrations are now open. Join us today!
There is still a lot of work to do on the wiki yet! More information about editing can be found here.
Already have an account?

Microsoft KB Archive/248768

From BetaArchive Wiki
Knowledge Base


ADSI Not Retrieving Multivalued Attributes Correctly for Dynamic Users

Article ID: 248768

Article Last Modified on 12/23/1999



APPLIES TO

  • Microsoft Site Server 3.0 Standard Edition



This article was previously published under Q248768

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
                

Keywords: kbprb KB248768