August 25th, 2010, 04:54 AM
SearchAll function returning incorrect results
Hi there, I'm experiencing some odd behaviour with searching in LDAP and wondered if I'm doing something silly/wrong to cause this. Basically I have two queries, using exactly the same collection of 'PropertiesToLoad' in the search, but with different search filters. The filters are:
(&(objectClass=user)(CN=" + email + "))
One calls the 'SearchAll' method, the other the 'FindOne'. I am checking to see that a specific user is returned; let's call him Dave. So when I run the first query with dave...
(&(objectClass=user)(CN=" + "dave" + "))
I get a result and Dave is retried from the ADAM.
However when I run the other query, searching for ALL users on exactly the same objectClass, 'dave' is not present.
Does anyone know why? I've tried looking at his entry in the ADAM itself to see if there are any clues as to why this might be happening but I can't see anything obvious.
Does anyone have any ideas?
Thanks in advance
<%Questions of Science%>