Fejl i skript.. Haster
Hvorfor får jeg denne fejl ?!Der opstod en Microsoft VBScript-kompileringsfejl fejl '800a03ea'
Der er en syntaksfejl
/Inkognito/view_user.asp, linje 5
case "del"
^
i dette script...
---view_user.asp---
<%@ Language=VBScript %>
<% select case Request.QueryString("mode") %>
<% Response.Buffer = true %>
<% case "del" %>
<% Set myConn = Server.CreateObject("ADODB.Connection")
myConn.Open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("users.mdb") & ";DriverId=25;FIL=MS Access"
Set rs = Server.CreateObject("ADODB.RecordSet")
strSQL = "Delete * FROM tblUsers WHERE (id = " & Request.QueryString("u") & ")"
rs.Open strSQL, myConn, 1, 3
Response.Redirect "view_user.asp"
%>
<% case "" %>
<head>
<title>Brugere</title>
</head>
<BODY bgcolor="#000000" link="#FF0000" vlink="#FF0000" alink="#FF0000">
<img border="0" src="logo.gif">
<p>
<font color="#FFFFFF"><%
strSQL = "SELECT * from tblUsers"
strDSN = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("users.mdb") & ";DriverId=25;FIL=MS Access"
Set myConn = Server.CreateObject("ADODB.Connection")
myConn.Open strDSN
Set rs = myConn.Execute(strSQL)
If Not (rs.BOF Or rs.EOF) Then
Do While Not rs.EOF
%></p>
<table border="1" width="760" height="47">
<tr>
<td width="80" height="47" rowspan="2"> <p><font color="#FFFFFF"><a href=view_user.asp?mode=del&u=<%=rs("id")%>>slet nr. <%=rs("id")%></a><br>
<a href=view_user.asp?mode=ret&id=<%=rs("id") %>>Ret</a><br></font></p></td>
<td width="205" height="13"><font color="#FFFFFF"><i>Navn:</i> <%=rs("username")%></font></td>
<td width="157" height="13"><font color="#FFFFFF"><i>Køn:</i> <%=rs("sex")%></font></td>
<td width="290" height="13" colspan="2"><font color="#FFFFFF"><i>E-mail:</i> <%=rs("email")%></font></td>
</tr>
<tr>
<td width="205" height="22"><font color="#FFFFFF"><i>Adresse:</i> <%=rs("adress")%></font></td>
<td width="157" height="22"><font color="#FFFFFF"><i>By:</i> <%=rs("post")%> <%=rs("by")%></font></td>
<td width="130" height="22"><font color="#FFFFFF"><i>Mobil:</i> <%=rs("mobiltelefon")%></font></td>
<td width="154" height="22"><font color="#FFFFFF"><i>Password:</i> <%=rs("password")%><font></td>
</tr>
</table>
<p> </p>
<%
rs.MoveNext
Loop
Else
Response.Write "<B>Listen er tom!</B><br><br>"
End If
myConn.Close
Set myConn = Nothing
Set rs = Nothing
%>
</font>
</body>
<% case "ret" %>
<% strSQL = "SELECT * from tblUsers where (Id = " & Request("id") & ")"
strDSN = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("users.mdb") & ";DriverId=25;FIL=MS Access"
Set myConn = Server.CreateObject("ADODB.Connection")
myConn.Open strDSN
Set rs = myConn.Execute(strSQL)
If Not (rs.BOF Or rs.EOF) Then %>
<form method="post" action="view_user.asp">
<table border="1" width="50%" cellpadding="0" cellspacing="0">
<tr>
<td width="50%">Navn :</td>
<td width="50%"><input type="text" name="navn" size="20" value="<%=rs("username")%>"></td>
</tr>
<tr>
<td width="50%">Køn :</td>
<td width="50%"><input type="text" name="sex" size="20" value="<%=rs("sex")%>"></td>
</tr>
<tr>
<td width="50%">E-Mail :</td>
<td width="50%"><input type="text" name="email" size="20" value="<%=rs("email")%>"></td>
</tr>
<tr>
<td width="50%">Adresse:</td>
<td width="50%"><input type="text" name="adresse" size="20" value="<%=rs("adress")%>"></td>
</tr>
<tr>
<td width="50%">By:</td>
<td width="50%"><input type="text" name="by" size="20" value="<%=rs("by")%>"></td>
</tr>
<tr>
<td width="50%">Post:</td>
<td width="50%"><input type="text" name="post" size="20" value="<%=rs("post")%>"></td>
</tr>
<tr>
<td width="50%">Mobil:</td>
<td width="50%"><input type="text" name="mobil" size="20" value="<%=rs("mobiltelefon")%>"></td>
</tr>
<tr>
<td width="50%">Password:</td>
<td width="50%"><input type="text" name="password" size="20" value="<%=rs("password")%>"></td>
</tr>
<tr>
<td width="50%"><input type="submit" value="Gem" name="ret"></td>
<td width="50%"><input type="reset" value="Slet Alt" name="B2"></td>
</tr>
</table>
</form>
<% end if %>
<% end select%>
----------------------