Problem med at slette række
Hej EksperterJeg er ved at lave en side hvor der skal være mulighed for at oprette og slette brugere, når man er logget ind som en bestemt bruger(admin).
Login og oprettelse af en ny bruger, er lavet og virker, men jeg kan ikke få slette delen til at virke :/
Fejl meddelsen er:
error '80020009'
/opret.asp, line 73
Nogen der kan se hvad jeg gør forkert?
<!--#INCLUDE FILE="connection.asp"-->
<!--#INCLUDE FILE="top.asp"-->
<tr>
<td height="400" colspan="3">
<div id="tekst"><font color="#000000" size="+2">Opret bruger</font><br><br>
<%
'Her er sql'en til at oprette en ny bruger
If request("do") = "send" Then
strSQL = "INSERT INTO user_gsoft (user, password, dlkode) VALUES ('" & Request.Form("user") & "','"& Request.Form("password") &"','"& Request.Form("dlkode") &"')"
conn.execute(strSQL)
response.Redirect("opretdone.asp")
End If
%>
<%
'Her udskrives formen til at oprette en ny bruger
If session("bruger") = "5" Then
%>
<style type="text/css">
input.textfield
{
width:83px;
}
</style>
<form name="warinput" method="POST" OnSubmit="return checkform();" action="opret.asp?do=send">
<table cellpadding="0" cellspacing="0" align="center" style="border-bottom:1px solid #2F5B84; border-left:1px solid #2F5B84; border-right:1px solid #2F5B84; border-top:1px solid #2F5B84;" width="200">
<tr height="10px">
<td align="left">Brugernavn:</td><td align="right"><input style="border:1px solid; border-color:#2F5B84; background-color:#FFFFFF;" onBlur="if(!!this.value.match(/['\$%]/)){alert('You are not allowed to use any of these letters /[\'$%]/');this.select();this.focus();}" class="textfield" type="text" name="user" value=""></td></tr>
<tr><td align="left">Password:</td><td align="right"><input style="border:1px solid; border-color:#2F5B84; background-color:FFFFFF;" onBlur="if(!!this.value.match(/['\$%]/)){alert('You are not allowed to use any of these letters /[\'$%]/');this.select();this.focus();}" class="textfield" type="text" name="password" value=""></td></tr>
<tr><td align="left">DL Kode:</td><td align="right"><input style="border:1px solid; border-color:#2F5B84; background-color:#FFFFFF;" onBlur="if(!!this.value.match(/['\$%]/)){alert('You are not allowed to use any of these letters /[\'$%]/');this.select();this.focus();}" class="textfield" type="text" name="dlkode" value=""></td>
<td></td>
</tr>
<tr height="30px">
<td colspan="6" align="center">
<input style="border:1px solid; border-color:#2F5B84; background-color:#FFFFFF;" type="submit" name="submit" id="submit" value="Tilføj bruger">
</td>
</tr>
</table>
</form>
<%
strSQL = "SELECT * FROM user_gsoft ORDER BY id DESC"
set RS = conn.execute(strSQL)
If Not RS.EOF Then
Do until RS.EOF
%>
<table style="border-bottom:1px solid #FF9900; border-left:1px solid #FF9900; border-right:1px solid #FF9900; border-top:1px solid #FF9900;" width="500" border="0">
<tr>
<td align="left" width="90"><%=RS("user")%></font></td>
<td align="left" width="60"><%=RS("password")%></td>
<td align="left" width="40"><%=RS("dlkode")%></td>
<%If Session("login") = "yes" Then%><td><a href="opret.asp?do=slet&ID=<%=RS("ID")%>">Slet</a></td><%End IF%>
</tr>
</table>
<%
RS.movenext()
Loop
End IF
%>
<%
If Request("do")="slet" then
strSQL = "DELETE * FROM user_gsoft WHERE id = " & RS("ID") & "" <--- <b>linje 73</b>
conn.execute(strSQL)
End If
%>
<%
End If
%>
<!--HER SKAL ALT INDHOLD SLUTTE -->
</div>
</td>
<td height="400" colspan="2"><div id="forsidebilled"><img src="pic/mailsendt.gif"></div></td>
</tr>
<tr>
<!--#INCLUDE FILE="bund.asp"-->
Håber der er nogen der kan hjælpe :)
Jeppe