---
title: "deleta ?"
type: "forum-thread"
url: "https://www.webforum.nu/amne/asp/11058-deleta"
topic: "ASP"
topic_url: "https://www.webforum.nu/amne/asp"
author: "snekkorr"
published: "2001-08-11T10:55:00.000Z"
updated: "2001-08-11T11:10:00.000Z"
replies: 3
views: 198
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/11058-deleta"
---

# deleta ?

## #1 — snekkorr, 2001-08-11T10:55Z

hur deletar jag ett Id tex i en gästbok så ska man kunna klicka på ta bort inlägg... ? exempel på smidig kod? så här ser koden ut som visar inläggen:

\<html\>
\<head\>
\<title\>Välkommen till min gästbok\</title\>
\</head\>
\<body bgcolor="#FFFFFF"\>
\<!-- #Include File="adovbs.inc" --\>
\<!-- #Include File="connect.asp" --\>

\<% Visa = "Select \* From gestboken"
   RecSet.Open visa, Connect, adOpenStatic, adLockOptimistic
%\>

\<%	Do While Not RecSet.EOF %\>

\<table width="40%" border="0" cellpadding="0" cellspacing="0" \>
 \<tr\>
\<td\>Inlägg #\<%= RecSet("Id") %\>\</td\> 
   \</tr\>
   \<tr\> 
    \<td\>\<%= RecSet("Namn") %\>&nbsp; \<%= RecSet("Efternamn") %\>\</td\>
  \</tr\>
 \<tr\> 
    \<td\>\<a href="\<%= RecSet("Hemsida") %\>"\>\<%= RecSet("Hemsida") %\>\</a\>\</td\>
  \</tr\>
  \<tr\> 
    \<td\>\<a href="mailto:\<%= RecSet("Email") %\>"\>\<%= RecSet("Email") %\>\</td\>
  \</tr\>
  \<tr\> 
    \<td\>\<%= RecSet("Text") %\>\<br\>\<hr\>\</td\>
  \</tr\>
\</table\>

\<%	RecSet.MoveNext
	Loop %\>

\<% 	RecSet.Close
	%\>

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

## #2 — icaaq, 2001-08-11T11:07Z

```
<html>
<head>
<title>Välkommen till min gästbok</title>
</head>
<body bgcolor="#FFFFFF">
<!-- #Include File="adovbs.inc" -->
<!-- #Include File="connect.asp" -->

<% Visa = "Select * From gestboken"
RecSet.Open visa, Connect, adOpenStatic, adLockOptimistic
%>

<% Do While Not RecSet.EOF %>

<table width="40%" border="0" cellpadding="0" cellspacing="0" >
<tr>
<td>Inlägg #<%= RecSet("Id") %></td> 
</tr>
<tr> 
<td><%= RecSet("Namn") %>  <%= RecSet("Efternamn") %></td>
</tr>
<tr> 
<td><a href="<%= RecSet("Hemsida") %>"><%= RecSet("Hemsida") %></a></td>
</tr>
<tr> 
<td><a href="mailto:<%= RecSet("Email") %>"><%= RecSet("Email") %></td>
</tr>
<tr> 
<td><%= RecSet("Text") %><br><hr></td>
</tr>
<tr> 
<td><a href="delete.asp?ID=<%= RecSet("ID") %>">Ta bort inlägg</a></td>
</tr>
</table>

<% RecSet.MoveNext
Loop %>

<% RecSet.Close
%>
```

och sen på delete.asp

```
intID = Request.Querystring("ID")
strSQL = "DELETE * FROM Din tabel WHERE [ID] = "&intID&""
ObjCon.execute(strSQL)
```

Typ nåt sånt kanske ?? :OO

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

## #3 — Nickemannen, 2001-08-11T11:08Z

d

\[Redigerat av Nickemannen den 11 aug 2001\]

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

## #4 — snekkorr, 2001-08-11T11:10Z

:d tack

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

---

Tråden på webben: https://www.webforum.nu/amne/asp/11058-deleta
