开发者

what is the difference between ldap_search_ext_s() and ldap_search_init_page()?

Which should be used in which scenarios?

Does ldap_search_init_page() also support to search with DirSync?

FYI:

http://msdn.microsoft.com/en-us/library/aa366972(v=vs开发者_C百科.85).aspx

http://msdn.microsoft.com/en-us/library/aa366973(v=vs.85).aspx

Thanks.


When you make a search on a Directory, it's not like in a database. The Directory is not supposed to give you back all the responses for your search (most of the time you not need them like in a google search). Directory servers assume good performances this way.

ldap_search_ext_s initiate a search, it's synschronous, and you can specify options like LDAP_OPT_SIZELIMIT and LDAP_OPT_TIMELIMIT (if they are available on the server). This API returns search result (if exists), and maybe more search result than a normal search.

With ldap_search_init_page() you initiate a kind of 'find fist', 'find next' search. This API does not return search result, but a structure tou can use in ldap_get_next_page, ldap_get_next_page_s, ldap_get_paged_count and ldap_search_abandon_page. ldap_get_next_page and ldap_get_next_page_s can return search result and the second one synchronously. This way allow you to retreive ALL the results for a search, be carefull it's not the way a normal LDAP search is supposed to work, this is bad on the performance point of view.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜