User Guide
Chapter 16: Connecting to LDAP Directories 257
<!--- query the LDAP server --->
<CFLDAP Name="AriusList"
SERVER="myserver"
ACTION="QUERY"
ATTRIBUTES="cn,mail,telephonenumber"
SCOPE="SUBTREE"
FILTER="ou=Human Resources"
SORT="cn ASC"
START="o=airius.com">
<!--- generate a form page for query output --->
<H3> Human Resources Directory for Arius</H3>
<CFFORM ACTION="ariusform_action.cfm">
<CFGRID NAME="ariusgrid" width="350" query="AriusList"
insert="No" delete="No" sort="no" bold="No" italic="No"
appendkey="No" highlighthref="No" griddataalign="LEFT"
gridlines="no" rowheaders="no" rowheaderalign="LEFT"
rowheaderitalic="No" rowheaderbold="No" colheaders="yes"
colheaderalign="LEFT" colheaderitalic="No"
colheaderbold="yes"
selectmode="BROWSE" picturebar="no">
<CFGRIDCOLUMN NAME="cn" HEADER="Name">
<CFGRIDCOLUMN NAME="mail" HEADER="eMail Address">
<CFGRIDCOLUMN NAME="telephonenumber" HEADER="Phone">
</CFGRID><BR>
</CFFORM>
<!---delete record --->
<CFLDAP
SERVER="myserver"
USERNAME="uid=kvaughan, ou=People, o=airius.com"
PASSWORD="bribery"
ACTION="DELETE"
DN="uid=jSmith, ou=People, o=airius.com">
3. Change myserver to a valid LDAP server.
4. Change the
uid to a valid user id.
5. Save the page as
ldapadd.cfm and view it in your browser.
To modify a record by adding an attribute:
This example illustrates modifying a record by adding an attribute value to the existing
values. This is a necessary step to overcome the limitations of the MODIFY attribute.
1. Open a new file in Studio.
2. Modify the file so that it appears as follows: