Display only manager's name from Active Directory

Posted on 2007-10-19
Medium Priority
Last Modified: 2008-01-09
I'm trying to display the manager's name in a web phonelist.  Everything "text" in Active Directory is showing correctly.

However, for the manager, the entire object Category is being displayed.

Instead of "Mary Jane", I get
"CN=Mary Jane,OU=Information Technology,OU=Departments,DC=xxxx,DC=xxxx,DC=xx,DC=xx"

Here is my select code:

strRS = "SELECT displayname,manager,sn,givenname,telephoneNumber,objectCategory,department  FROM 'LDAP://XXXX' WHERE "
     strRS =  strRS & "objectCategory = 'CN=Person,CN=Schema,CN=Configuration,DC=xxxx,DC=xxxx,DC=xx,DC=xx'"
     strRS =  strRS & " and ( telephoneNumber = '5*' "
     strRS =  strRS & " or telephoneNumber = '3*' ) order by sn"
     RS.Open strRS, Conn


And here is my display code

<tr><td width="34%"><b><font face="Verdana" size="2"><%=rs.Fields("department")%> </font></b> </td><td width="34%"><b><font face="Verdana" size="2"><%=rs.Fields("manager")%> </font></b> </td><td width="37%"><b><font face="Verdana" size="2"><%=rs.Fields("displayname")%> </font></b> </td><td width="29%"  align="center"><b><font face="Verdana" size="2" ><%=rs.Fields("telephoneNumber")%></font></b></td></tr>

Question by:shelbyinfotech
  • 2
LVL 10

Accepted Solution

effx earned 1000 total points
ID: 20117395
Try :


Author Comment

ID: 20123754
I still get the same result:
CN=Mary Jane,OU=Information Technology,OU=Departments,DC=xxxx,DC=xxxx,DC=xx,DC=xx
LVL 10

Expert Comment

ID: 20341103
You could do this :
<%=Split(Split(rs("manager").Value, ",")(0), "=")(1)%>

Open in new window


Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses
Course of the Month12 days, 19 hours left to enroll

579 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question