Velocity Reviews

Velocity Reviews (
-   ASP General (
-   -   Need assistance Sorting this AP page ( 11-14-2005 03:50 PM

Need assistance Sorting this AP page
I have been able to create a web based company phone book by retrieving
the last name, first name, email address and telephone # from active
directory. However I need serious assistance in modifying the code to
sort the columns by order of last name then first name for ease of use
by our user community. Any assistance woudl be much appreciate since I
am a complete newbie to asp. I have quoted the cide for producing the
address book as follows:

<meta HTTP-EQUIV="Content-Type" content="text/html;
<title>Company Address Book</title>
<body style="text-align: center">

<H1 align="center">Company Address Book</H1>
<TABLE BORDER="1" style="text-align: center">
strDomainDN = " DC=mydomain, DC=com"
Set objCon = CreateObject("ADODB.Connection")
objCon.Provider = "ADsDSOObject;"
objCon.Open "Active Directory Provider"
Set objRS = objCon.Execute("<LDAP://" & strDomainDN & ">;" &
"(&(objectCategory=Person)(objectClass=user)(mail= *));" &
"sn,givenName,telephoneNumber,mail;subtree" )
Response.write "<tr bgcolor=""#aaaaaa""><td ALIGN=Center><B>" & "Last
Name" & "</B></td>"
Response.write "<td ALIGN=Center><B>" & "First Name" & "</B></td>"
Response.write "<td ALIGN=Center><B>" & "Phone #" & "</B></td>"
response.write "<td ALIGN=Center><B>" & "E-mail Address" &
While Not objRS.EOF
response.write "<td ALIGN=Left>" & objRS.Fields(0).Value & "</td>"
response.write "<td ALIGN=Left>" & objRS.Fields(1).Value & "</td>"
response.write "<td ALIGN=Left>" & objRS.Fields(2).Value & "</td>"
response.write "<td><A HREF=""mailto:" & objRS.Fields(3).Value &
response.write objRS.Fields(3).Value & "</A></td></tr>"

Set objRS = Nothing
Set objCon = Nothing


All times are GMT. The time now is 07:09 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.