Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 461

Developing applications
Hide thumbs Also See for 38043740 - ColdFusion Standard - Mac:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Accessing and Using Data
• Using filter operators to construct sophisticated search criteria can degrade performance if the LDAP server is slow
to process the synchronous search routines that
attributes to control the apparent performance of pages that perform queries, by limiting the number of entries and
by exiting the query if the server does not respond in a specified time.
Getting all the attributes of an entry
Typically, you do not use a query that gets all the attributes in an entry. Such a query would return attributes that only
the directory server uses. However, you can get all the attributes by specifying attributes="*" in your query.
If you do this, ColdFusion returns the results in a structure in which each element contains a single attribute name-
value pair. The tag does not return a query object. ColdFusion does this because LDAP directory entries, unlike the
rows in a relational table, vary depending on their object class.
For example, the following code retrieves the contents of the Airius directory:
<cfldap name="GetList"
server=#myServer#
action="query"
attributes="*"
scope="subtree"
start="o=airius.com"
sort="sn,cn">
This tag returns entries for all the people in the organization and entries for all the groups. The group entries have a
different object class, and therefore different attributes from the person entries. If ColdFusion returned both types of
entries in one query object, some rows would have only the group-specific attribute values and the other rows would
have only person-specific attribute values. Instead, ColdFusion returns a structure in which each attribute is an entry.
Example: querying an LDAP directory
The following example uses the
office. Users can enter all or part of a person's name and get a list of matching names with their departments, e-mail
addresses, and telephone numbers.
This example uses the sample Airius corporate directory that is distributed with the Netscape Directory Server. If you
do not have access to this directory, modify the code to work with your LDAP directory.
Create a file that looks like the following:
1
cfldap
tag to get information about the people in the Airius corporation's Santa Clara
cfldap
Last updated 1/20/2012
supports. Use the
tag
cfldap
and
timeout
maxRows
456

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents