Windows IT Pro is the leading independent community for IT professionals deploying Microsoft Windows server and client applications and technologies.
  
  
  Advanced Search 


May 01, 1999

Understanding ADO Search Filters in LDAP Queries


RSS
View this exclusive article with VIP access -- click here to join |
See More ActiveX Data Objects (ADO) Articles Here | Reprints | Or sign up for our VIP Monthly Pass!

If you want to use ADO to perform a Lightweight Directory Access Protocol (LDAP) search, you need to specify four arguments: search base, filter, attributes, and scope. Although specifying the search base, attributes, and scope arguments is straightfoward (see Alistair G. Lowe-Norris, "An ADSI Primer, Part 5: Using ADO to Script Fast ADSI Searches," page 1), specifying the filter argument isn't.

The filter argument defines which objects match the query you want to perform. Because you can use a filter on any property of any object, you can conduct powerful searches. For example, you can search for any object that has a description matching a text substring you specify. (You can't match long integers and other nontext data types.)

Although filters let you conduct powerful searches, working with filters can seem complex because they must follow the format that Request for Comments (RFC) 1960 dictates. For example, the format dictates that filters are case-sensitive, that you must not have any spaces within a string in a filter, that you must enclose each filter in parentheses, and that you must use semicolons with no spaces before or after to separate filters. You can download the text of RFC 1960 from ftp://ftp.isi.edu/in-notes/rfc1960.txt. . . .


Already a VIP member?
Please log on to view the full article

Why become a VIP member?

VIP-only online access
VIP CD delivered twice a year: offline access to the entire Windows IT Pro article library
Monthly issue of your choice of Windows IT Pro or SQL Server Magazine

Subscribe Now
Reader Comments
<P>Excellent--need more of this sort of lucid explanation. I would like to have more complete list of directory entry attributes; maybe the RFC is required reading.</P>

Peter Kryszak April 21, 2004


Very nice article -- I too would like a list of the attributes

Charles Lorigo July 07, 2004


Each directory is different, and so has a different set of attributes. You will need to get with your LDAP provider to determine that information.

Anonymous User October 12, 2004


Thank you

Anonymous User October 25, 2004 (Article Rating: )


I read RFC2254 but this article really helped me make sense of it.

Anonymous User December 02, 2004 (Article Rating: )


You must be a registered user or online subscriber to comment on this article. Please log on before posting a comment. Are you a new visitor? Register now




Top Viewed ArticlesView all articles
What You Need to Know About Microsoft's x64 Server Product Plans

What do Longhorn Server, Windows Compute Cluster Server, and Windows Vista have in common? The x64 platform. ...

Anti-Virus Vendors Prepare for War with Microsoft ... Again

When Microsoft announced its Windows Live OneCare security and PC health product over five years (as MSN OneCare), Symantec, McAfee, and the other consumer-oriented security vendors reacted with stunning vigor. ...

Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...


Related Events Check out our list of Free Email Newsletters!

Scripting eBooks Keeping Your Business Safe from Attack: Encryption and Certificate Services

Best Practices for Managing Linux and UNIX Servers

Building an Effective Reporting System

Related Scripting Resources Introducing Left-Brain.com, the online IT bookstore
Looking for books, CDs, toolkits, eBooks? Prime your mind at Left-Brain.com

Discover Windows IT Pro eLearning Series!
Clear & detailed technical information and helpful how-to's, all in our trademark no-nonsense format

Test Drive IT Solutions and Get Free Music Downloads
Solve your toughest IT problems with these free downloads and receive 5 free music downloads!


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro DevProConnections IT Job Hound ITTV
IT Library Technology Resource Directory Connected Home asp.netPRO Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 © 2009 Penton Media, Inc. Terms of Use | Privacy Statement | Reprints and Licensing