Mark Smith wrote:
Mark Banner wrote:
Is there an easy way with LDAP (and the current 5.1.7 client branch)
to get the number of items in a search result, before receiving all
the results themselves?
I've been looking through the documentation and not found a reference
to this so I guess it probably can't be done, but just want to check
before I forget the idea completely.
I am not sure I understand exactly what you are asking but I assume you
want to find out how many entries a search would return without having
the server return all the entries to the client.
The way the base LDAP protocol is designed, the entries included in a
search result must be retrieved in order to count them. You can limit
the amount of data between the server and your client by asking for a
minimal number of attributes,
Right. Asking for the attribute named "dn" or "1.1". The canonical way
is to specify the attribute named by the non-existant OID "1.1" in the
list of attributes to be returned by the server in the search request.
or, in servers that support it, you can
use fancier things like a Virtual List View control to retrieve a count.
Typically, VLV must be preconfigured on the server side for best
performance though.
_______________________________________________
dev-tech-ldap mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-ldap