Hello,
"You won't get the count without retrieving the results."
I believe when you call a ldap_search_s(), the last argument of the function LDAPmessage *result stores the result from the ldap search.
If it is true, what should be the next call to get the number of entries ?
and if not, what should be the functions call that i have to make to get the count.
Regards,
PKHUN
Puneet Khunteta wrote:You won't get the count without retrieving the results.
> Basically i need the count how many SearchResultEntry responses you get from
> ldap_search_s().
This is something different:
> "true/false for the particular filter" means following :
> 1.) If execute a filter , respond with >0 entry ---> true
> 2.) If execute a filter , respond with = 0 entry --> false.
>
> Note : i have nothing to do with the attributes for the corresponding entries
> return for the search. So i am looking for a optimized way here which just let
> me know if any entry is available or not for particular filter.
Simply set sizelimit=1 when using ldap_search_ext_s() and return true if one
result was received.
Ciao, Michael.