[Date Prev][Date Next] [Chronological] [Thread] [Top]

RE: Any sample on sorting?



RE: Any sample on sorting? Active Directory only supports one sort key, but = the samples I've seen of using sort keys uses an array of pointers, with = a NULL terminator: LDAPSortKey ldapSortKey = { "cn", /* Attribute to sort on */ NULL, = /* Pointer to matching rule OID string (use NULL) */ FALSE,/* FALSE for regular sort order, TRUE for reverse order = */ }; PLDAPSortKey pldapSortKeys[] = { = &ldapSortKey, NULL }; You should be aware that you cannot sort on a = multivalued attribute - I don't know if that's a limitation of Active = Directory or the LDAP API. Charles Oppermann Copper Software Active Directory information at http://w= ww.coppersoftware.com/software/activedirectory/ charles@coppersoftware.com -----Original Message----- From: Burkule, Sanju [mailto:sanju.burkule@unisys.com<= /A>] Sent: Tuesday, January 02, 2001 3:57 = PM To: openldap-general@OpenLDAP.org Subject: Any sample on sorting? Hi, Could anyone point me to a C++ sample which does = ldap sorting? An example related to Active Directory would be great. I am = not able to get ldap_create_sort_control to work. It throws some = exception. Its not clear whether the first parameter - LDAPSortKey list - = ends with a NULL or not. Any help is appreciated. Thanks, -sanju