Du har ret det virker fint : her kommer hele koden, det må være et andet sted så det går galt.
-----------------------------------------------
Sql = \"Select Top 10 Referent, Count (*) AS Total FROM Count Where Referent is not Null GROUP BY Referent ORDER BY Count(Referent) DESC\"
Set RsTop10 = Conn.Execute(Sql)
%>
<html>
<head>
<meta http-equiv=\"Content-Language\" content=\"da\">
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=windows-1252\">
<meta name=\"GENERATOR\" content=\"Microsoft FrontPage 4.0\">
<meta name=\"ProgId\" content=\"FrontPage.Editor.Document\">
<title>Ny side 1</title>
</head>
<body>
<table border=\"0\" width=\"640\" cellspacing=\"0\" cellpadding=\"0\">
<tr>
<td width=\"10%\" align=\"center\"><b><font size=\"2\" face=\"Book Antiqua\">RANK</font></b></td>
<td width=\"31%\" align=\"center\"><b><font size=\"2\" face=\"Book Antiqua\">REFERING
WEBSITES</font></b></td>
<td width=\"59%\"><b><font size=\"2\" face=\"Book Antiqua\">HITS </font></b></td>
</tr>
</table>
<table border=\"0\" width=\"640\" cellpadding=\"0\">
<tr>
<td width=\"10%\" align=\"center\"><b><font face=\"Book Antiqua\" size=\"2\">1</font></b></td>
<td width=\"90%\" rowspan=\"10\" valign=\"top\">
<table border=\"0\" width=\"100%\" cellpadding=\"0\">
<%
Do While Not RsTop10.EOF
Name = RsTop10(\"Referent\")
If Left(Name, 7) = \"
http://\" then
Name = mid(Name, 8)
End If
If Left(Name, 4) = \"www.\" then
Name = mid(Name, 5)
End If
domainpos = instr(name, \"/\")
if cint(0&domainpos)>0 then
name = mid(name, 1, domainpos-1)
end if
counter = 0
for i = 1 to len(name)
if mid(name, i, 1) = \".\" then
counter = counter + 1
end if
next
if counter > 1 then
domainpos = instr(name, \".\")
name = mid(name, domainpos + 1)
end if
%>
<tr>
<td width=\"34%\"><a href=\"<%= RsTop10(\"Referent\")%>\" target=\"_blank\"><font size=\"2\" face=\"Book Antiqua\"><%response.write(Name)%></font></a></td>
<td width=\"66%\"><font size=\"2\" face=\"Book Antiqua\"><%= RsTop10(\"Total\")%></font></td>
</tr>
<%
RsTop10.MoveNext
Loop
%>
</table>
</td>
</tr>
<tr>
<td width=\"10%\" align=\"center\"><b><font face=\"Book Antiqua\" size=\"2\">2</font></b></td>
</tr>
<tr>
<td width=\"10%\" align=\"center\"><b><font face=\"Book Antiqua\" size=\"2\">3</font></b></td>
</tr>
<tr>
<td width=\"10%\" align=\"center\"><b><font face=\"Book Antiqua\" size=\"2\">4</font></b></td>
</tr>
<tr>
<td width=\"10%\" align=\"center\"><b><font face=\"Book Antiqua\" size=\"2\">5</font></b></td>
</tr>
<tr>
<td width=\"10%\" align=\"center\"><b><font face=\"Book Antiqua\" size=\"2\">6</font></b></td>
</tr>
<tr>
<td width=\"10%\" align=\"center\"><b><font face=\"Book Antiqua\" size=\"2\">7</font></b></td>
</tr>
<tr>
<td width=\"10%\" align=\"center\"><b><font face=\"Book Antiqua\" size=\"2\">8</font></b></td>
</tr>
<tr>
<td width=\"10%\" align=\"center\"><b><font face=\"Book Antiqua\" size=\"2\">9</font></b></td>
</tr>
<tr>
<td width=\"10%\" align=\"center\"><b><font face=\"Book Antiqua\" size=\"2\">10</font></b></td>
</tr>
</table>
--------------------------------------------------
Håber det er til at finde udaf.