User Guide
Chapter 16: Connecting to LDAP Directories 255
Although sophisticated search criteria can be constructed from these filter operators,
performance may degrade if the LDAP server is slow to process the synchronous
search routines supported by CFLDAP. The TIMEOUT and MAXROWS attributes can
be used to control query performance.
The following uses CFLDAP to retrieve the name and telephone numbers for US
organizations with a common name that starts with ’A’ through ’E’. The search starts
in the country: US. The filter is a regular expression that limits the search to
expressions of any length that begin with "A," "B," "C," "D," or "E."
To query an LDAP directory:
1. Open a new file in Studio.
2. Modify the file so that it appears as follows:
<CFLDAP NAME="OrgList"
SERVER="ldap.itd.umich.edu"
ACTION="QUERY"
ATTRIBUTES="o,st,telephoneNumber"
SCOPE="ONELEVEL"
FILTER="(|(o=A*)(o=B*)(o=C*)(o=D*)(o=E*))"
MAXROWS=200
SORT="o"
START="c=US">
<HTML>
<HEAD>
<TITLE>LDAP Directory Example</TITLE>
</HEAD>
<BODY>
<H3>US Organizations beginning with
the letter ’A’ thru ’E’:</H3>
* o=alla* - organization names starting with "alla"
o=*aire - organization names ending with "aire"
o=all*aire - organization names starting with "all and " ending with
"aire"
& (&(o=allaire)(co=usa)) - organization name = "allaire" AND country =
"usa"
| (|(o=allaire)(sn=allaire)) - organization name = "allaire" OR surname =
"allaire"
! (!(STREET=*)) - all entries that do NOT contain a StreetAddress attribute
CFLDAP Filter Operators (Continued)
Operator Example