---
title: "förbannade felmess"
type: "forum-thread"
url: "https://www.webforum.nu/amne/asp/91964-förbannade-felmess"
topic: "ASP"
topic_url: "https://www.webforum.nu/amne/asp"
author: "atra"
published: "2003-12-05T16:36:26.000Z"
updated: "2003-12-05T16:42:26.000Z"
replies: 1
views: 489
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/91964-förbannade-felmess"
---

# förbannade felmess

## #1 — atra, 2003-12-05T16:36Z

Hej!
försöker att fixa mitt nyhetsscript men får bara  upp detta felmess:
Feltyp:
ADODB.Connection (0x800A0E78)
Åtgärden är inte tillåten när objektet är stängt.
/projekt-03/FT/nyheterna.asp, line 13

Här finns lite kod

```
<html>
<head>
<link href="C:\Inetpub\wwwroot\projekt-03\FT\CSS\tf.css" rel="stylesheet" type="text/css">
<title>hej</title>
</head>
<%
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "Driver={Microsoft Access Driver (*.mdb)}; dbq=" & Server.MapPath ("db/ft.mdb")
Set RecSet = Server.CreateObject("ADODB.Connection")
RecSet.Open SQL, Conn, 3, 3
SQL = "SELECT TOP 2 * FROM news ORDER BY id DESC"
%>
<% Do Until RecSet.EOF %>

<%Response.Write " "&RecSet("namn")&" "%>

<%
RS.MoveNext
LOOP
 
RecSet.Close
Conn.Close
Set RecSet = nothing
Set Conn = nothing
%>

</html>
```

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

## #2 — LarsG, 2003-12-05T16:42Z

istf detta

```
Set RecSet = Server.CreateObject("ADODB.Connection")
RecSet.Open SQL, Conn, 3, 3
SQL = "SELECT TOP 2 * FROM news ORDER BY id DESC"
%>
<% Do Until RecSet.EOF %>

<%Response.Write " "&RecSet("namn")&" "%>

<%
RS.MoveNext
LOOP
```

använd detta

```
SQL = "SELECT TOP 2 * FROM news ORDER BY id DESC"
set recset = conn.execute(sql)
%>
<% Do Until RecSet.EOF %>

<%Response.Write " "&RecSet("namn")&" "%>

<%
RecSet.MoveNext
LOOP
```

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

---

Tråden på webben: https://www.webforum.nu/amne/asp/91964-förbannade-felmess
