Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Software > Active directory Interfaces > DirectorySearch...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 2305 of 2407
Post > Topic >>

DirectorySearcher .Filter settings - multiple filters?

by "Mark B" <marximus@[EMAIL PROTECTED] > Jun 8, 2008 at 10:44 AM

Hi,

I need to search AD for users, based on a text string entered by the Admin

in to my program.

Can I do

"(&(objectClass=user)(sAMAccountName=" & SearchString & "*)(SN=" & 
SearchString & "*)(GivenName=" & SearchString & "*))"

Note that I want want to OR these search terms.

If SearchString = sAMAccountName or SN or GivenName

.... then add it to the list.

What would be the syntax if I COULD do it? I'm worried about that & at the

front that might mean where object class = User AND 
sAMAccountName=SearchString.

Any help appreciated.

In my previous (VB6) version, I was issuing an SQL type query. I'd prefer
to 
stick with pure .NET, this time around, if possible.

Mark
 




 3 Posts in Topic:
DirectorySearcher .Filter settings - multiple filters?
"Mark B" <ma  2008-06-08 10:44:11 
Re: DirectorySearcher .Filter settings - multiple filters?
"Mark B" <ma  2008-06-08 16:05:28 
Re: DirectorySearcher .Filter settings - multiple filters?
"Henning Krause [MVP  2008-06-08 10:21:14 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Dec 4 21:43:45 CST 2008.