I am writing a asp page to allow customers to subscribe/unsubscribe from our
distribution lists. Everything is working properly when creating the contact
except that the values entered for Company and WorkCountry are not displayed
in Active Directory Users and Computers.
The values are there however when queried via a second asp page.
Any ideas why this is not working properly would be appreciated.
Craig Freemark
This scripts creates the contact in Active Directory
<%
'Declare variables
Dim iPer
Dim strLDAP
Set iPer = CreateObject("CDO.Person")
With iPer
'Set first and last names and company name
.FirstName = "Peter"
.LastName = "Porzuczek"
.Company = "Coho Winery"
.WorkCountry = "CANADA"
'Indicate that this is a contact
.Fields("objectClass").Value = "contact"
'Save changes made to properties
.Fields.Update
End With
'Setup the LDAP string
strLDAP = "LDAP://Server/CN=Test User, dc=domain, dc=com"
'Save the contact to Active Directory
iPer.DataSource.SaveTo strLDAP
%>
This scripts shows that the contact information was exists
<%
'Declare variables
Dim iPer
Dim strLDAP
Set iPer = CreateObject("CDO.Person")
'Setup the LDAP string
strLDAP = "LDAP://Server/CN=Test User, dc=domain, dc=com"
iPer.DataSource.Open strLDAP
With iPer
Response.Write( "<p>" & .FirstName & " " )
Response.Write( .LastName & "</p>")
Response.Write( "<p>" & .Company & "</p>" )
Response.Write( "<p>" & .WorkCountry & "</p>" )
End With
%>