MACROMEDIA COLDFUSION 4.5-DEVELOPING WEB Develop Manual page 281

Developing web applications with coldfusion
Table of Contents

Advertisement

Chapter 16: Connecting to LDAP Directories
CFLDAP Filter Operators (Continued)
Operator
*
&
|
!
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"
<HTML>
<HEAD>
</HEAD>
<BODY>
<H3>US Organizations beginning with
Example
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
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">
<TITLE>LDAP Directory Example</TITLE>
the letter 'A' thru 'E':</H3>
255

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 4.5

Table of Contents