Created by: peter bowles on 20-04-2012 06:31:01 AM Hi. I am using the following code to perform a simple search on my active directory and output to a cisco phone. It all works except where I do a search which contains alot of users, say more than 100 I get an XML parse error - reading around I might have to implement something call pagaing can any offer any advice? +++++
<%@ LANGUAGE=VBSCRIPT %> <% response.ContentType="text/xml" Dim strUserGN, strUserSN, strUserPhone, strUserDept, strUserMobile, strSQL Dim connAD, sql, rs, strLN, strGN, strEID, strName, strFN, strDEPT strEID=Request.QueryString("strTestA") set connAD = Server.CreateObject("ADODB.Connection") connAD.Provider = "ADsDSOObject" connAD.Properties("User ID") = "USERID" ' ### remember to make sure this user has rights to access AD connAD.Properties("Password") = "PASSWORD" connAD.Properties("Encrypt Password") = true connAD.Open strSQL="SELECT givenName, sn, department, telephoneNumber, mobile FROM 'LDAP://[addressORT]' WHERE employeeID='" & strEID & "'" Set rs = connAD.Execute(sql) strUserPhone=rs("telephoneNumber") strFN=rs("givenName") strLN=rs("sn") strDEPT=rs("department") response.Write("<CiscoIPPhoneDirectory>") response.Write("<Title>Details: "&strFN&" "&strLN&"</Title>") response.Write("<Prompt>Please dial number</Prompt>") response.Write("<DirectoryEntry>") response.Write("<Name>SNR</Name>") response.Write(" <Telephone>" & strUserPhone &"</Telephone>") response.Write("</DirectoryEntry>") response.Write("</CiscoIPPhoneDirectory>") response.End() rs.close connAD.Close set rs=Nothing set connAD = Nothing %>
Subject: RE: ASP directory Lookup Replied by: David Staudt on 20-04-2012 03:53:48 PM The CiscoIPPhoneMenu can handle up to 100 menu items. If you have more than that, you will want to implement 'paging' functionality, e.g. by adding a softkey item for 'More...' or similar to the Menu object, with a URL back to your app that requests the next 100 records.
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: