I am trying to query Active Directory for information through ASP
I am able to pull up cn, telephoneNumber, and many other fields.
Yet I am not able to pull up otherTelephone.
I read, according to numerous internet documentation, that otherTelephone is only an array element below telephoneNumber. Yet I am still unable to query the field otherTelephone in any format or display the information as an array element of telephoneNumber.
Here is my syntax to display cn, and telephoneNumber:
<%
SQLStmt = "SELECT cn, telephoneNumber FROM 'myLDAP' WHERE objectClass = '*' AND description = 'myCode' ORDER BY cn"
Set Conn = CreateObject("ADODB.Connection"
Conn.Provider = "ADSDSOObject"
Conn.Open "ADs Provider", "", ""
Set rs = Conn.Execute(SQLStmt)
Do While Not rs.EOF
If Not rs.EOF Then
EName = rs.Fields("cn"
.Value
EPager = rs.Fields("telephoneNumber"
.Value
Response.Write " <tr height=18 style='mso-height-source:userset;height:13.5pt'><td> "
If IsArray(EName) Then
For I = LBound(EName) To UBound(EName)
Response.Write EName(I)
Next
End If
Response.Write " </p></td><td><p align=center>"
If IsArray(EPager) Then
For I = LBound(EPager) To UBound(EPager)
Response.Write EPager(I)
Next
Else
Response.Write " "
End If
Response.Write " </p></td></tr>"
End If
rs.MoveNext
Loop
%>
What do I need to modify to display the next element of
telephoneNumber?
I am able to pull up cn, telephoneNumber, and many other fields.
Yet I am not able to pull up otherTelephone.
I read, according to numerous internet documentation, that otherTelephone is only an array element below telephoneNumber. Yet I am still unable to query the field otherTelephone in any format or display the information as an array element of telephoneNumber.
Here is my syntax to display cn, and telephoneNumber:
<%
SQLStmt = "SELECT cn, telephoneNumber FROM 'myLDAP' WHERE objectClass = '*' AND description = 'myCode' ORDER BY cn"
Set Conn = CreateObject("ADODB.Connection"
Conn.Provider = "ADSDSOObject"
Conn.Open "ADs Provider", "", ""
Set rs = Conn.Execute(SQLStmt)
Do While Not rs.EOF
If Not rs.EOF Then
EName = rs.Fields("cn"
EPager = rs.Fields("telephoneNumber"
Response.Write " <tr height=18 style='mso-height-source:userset;height:13.5pt'><td> "
If IsArray(EName) Then
For I = LBound(EName) To UBound(EName)
Response.Write EName(I)
Next
End If
Response.Write " </p></td><td><p align=center>"
If IsArray(EPager) Then
For I = LBound(EPager) To UBound(EPager)
Response.Write EPager(I)
Next
Else
Response.Write " "
End If
Response.Write " </p></td></tr>"
End If
rs.MoveNext
Loop
%>
What do I need to modify to display the next element of
telephoneNumber?