256
<CFFORM NAME="GridForm" ACTION="org_query.cfm">
</CFFORM>
</BODY>
</HTML>
3.
Save the page as
Updating an LDAP Directory
Entries can be added, modified, and deleted. Remote administration of an LDAP server
is one possible using one of these options.
The following example runs a cycle of LDAP actions by first adding a new record, then
querying the LDAP directory and generating a form for the output, and finally deleting
the new record.
To add a new record:
1.
Open a new file in Studio.
2.
Modify the file so that it appears as follows:
<!--- add a new record (Joe Smith) --->
<CFLDAP
<CFGRID NAME="grid_one"
QUERY="OrgList"
HEIGHT=250
WIDTH=620
HSPACE=20
VSPACE="6">
<CFGRIDCOLUMN NAME="o"
HEADER="Organization" WIDTH=380>
<CFGRIDCOLUMN NAME="st"
HEADER="State" WIDTH=100>
<CFGRIDCOLUMN NAME="telephoneNumber"
HEADER="Phone ##" WIDTH=150>
</CFGRID>
ldapadd.cfm
SERVER="myserver"
USERNAME="uid=kvaughan, ou=People, o=airius.com"
PASSWORD="bribery"
ACTION="ADD"
ATTRIBUTES="objectclass=top, person, organizationalPerson
inetOrgPerson; cn=Joe Smith;
sn=Smith; mail=jSmith@airius.com;
telephonenumber=+1 408 555 2128; ou=Human Resources"
DN="uid=jSmith, ou=People, o=airius.com">
Developing Web Applications with ColdFusion
and view it in your browser.