---
title: "Hur göra?"
type: "forum-thread"
url: "https://www.webforum.nu/amne/asp/13474-hur-göra"
topic: "ASP"
topic_url: "https://www.webforum.nu/amne/asp"
author: "webzonen"
published: "2002-01-01T17:51:00.000Z"
updated: "2002-01-01T18:02:00.000Z"
replies: 2
views: 153
page: 1
pages: 1
language: "sv-SE"
site: "webForum — webforum.nu"
rights: "Upphovsrätten till varje inlägg tillhör dess författare."
attribution: "Citera som: webForum, https://www.webforum.nu/amne/asp/13474-hur-göra"
---

# Hur göra?

## #1 — webzonen, 2002-01-01T17:51Z

Jag försöker få fram en topplista, så här ska det vara:
1 Namn
2 Namn2
3 Namn3
osv, men med denna kod 

```
<% 
		Set Connect = Server.CreateObject("ADODB.Connection")
		Connect.Open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & DBpath
		SQL = "SELECT TOP 10 * FROM Medlemmar ORDER BY f_Sidbesok DESC"
		Set RS= Server.CreateObject("ADODB.Recordset")
		RS.Open SQL, Connect, 3,3
		%>
		<table cellspacing="0" cellpadding="0">
		<% Do Until i=10 %>
		<% Do Until RS.EOF %>
		<tr>
                <td><% =basefont %>
		<% i=i+1  %><%=i%>.
		</td>
		<td>
		<% =basefont %>
		<% = RS("f_nick") %>
		</td>
		</tr>
		<% 
		Loop
		RS.Movenext
		Loop
		%>
		</table>
```

så blir det
1 samma namn
2 samma namn
3 samma namn
4 samma namn

det blir likadant med 

```
	<table cellspacing="0" cellpadding="0">
		<% Do Until RS.EOF %>
		<% Do Until i=10 %>
		
		<tr>
		
		
		
		<td><% =basefont %>
		<% i=i+1  %><%=i%>.
		</td>
		<td>
		<% =basefont %>
		<% = RS("f_nick") %>
		</td>
		</tr>
		<% 
		Loop
		RS.Movenext
		Loop
		%>
```

Permalänk: https://www.webforum.nu/p/13474

## #2 — icaaq, 2002-01-01T17:58Z

```
<% 
		Set Connect = Server.CreateObject("ADODB.Connection")
		Connect.Open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & DBpath
		SQL = "SELECT TOP 10 * FROM Medlemmar ORDER BY f_Sidbesok DESC"
		Set RS= Server.CreateObject("ADODB.Recordset")
		RS.Open SQL, Connect, 3,3
		%>
		<table cellspacing="0" cellpadding="0">
<%
i = 0
		 Do Until RS.EOF
i = i +1
 %>
		<tr>
                <td><% =basefont %>
		<%=i%>.
		</td>
		<td>
		<% =basefont %>
		<% = RS("f_nick") %>
		</td>
		</tr>
		<% 
		
		RS.Movenext
Loop
		%>
		</table>
```

Permalänk: https://www.webforum.nu/p/302231

## #3 — webzonen, 2002-01-01T18:02Z

tack, icaaq, alltid proffesionella svar!

Permalänk: https://www.webforum.nu/p/302232

---

Tråden på webben: https://www.webforum.nu/amne/asp/13474-hur-göra
