Klassiker: beklager: Too few parameters. Expected 1.
Hmmm, der er vist problemer omkring: conn.Execute(SQLstmt) men kan simpelthen ikke finde fejlen - anyone?Update<HR>
<FORM METHOD="post" ACTION="moddata.asp?Actionvar=update">
<B>Nuværende kategori</B><%=rs("Sub")%>Vælg anden kategori <select name="Sub" size="1">
<option>Vælg menu kat.</option>
<option value="corpid">Corporate Identity</option>
<option value="prints">Tryksager</option>
<option value="screen">Skærmdesign</option>
<option value="display">Udstillinger</option>
<option value="public">Offentligt design</option>
<option value="product">Produktdesign</option>
</select><br>
<br>
<b>Link Navn</b><INPUT TYPE="text" NAME="Name" VALUE='<%=rs("Name")%>'><BR>
<B>Link:</B> <INPUT TYPE="text" NAME="Link" VALUE='<%=rs("Link")%>'><BR>
<INPUT TYPE="hidden" NAME="flag" VALUE="2">
<INPUT TYPE="hidden" NAME="Recordid" VALUE="<%=rs("ID")%>">
<INPUT TYPE="submit" VALUE="Update">
</FORM>
<%
rs.MoveNext
rs.Close
END IF
ELSEIF Request.Form("flag")="2" THEN
SQLstmt = "UPDATE navigation SET "
SQLstmt = SQLstmt & "Sub='" & TRIM(Request.Form("Sub")) & "', "
SQLstmt = SQLstmt & "Name='" & TRIM(Request.Form("Name")) & "', "
SQLstmt = SQLstmt & "Link=" & TRIM(Request.Form("Link"))
SQLstmt = SQLstmt & " WHERE ID=" & TRIM(Request.Form("Recordid"))
' WHERE
%>
<HR>
SQL statement: <%=SQLstmt%>
<HR>
<%
conn.Execute(SQLstmt)
Response.Write "Operation Complete<br><A HREF=""moddata.asp"">Home</A>"
END IF
'If the QueryString has the Actionvar = delete then delete the item
'and generate an "Operation Complete" page
ELSEIF Actionvar="delete" THEN
SQLstmt = "DELETE * FROM navigation WHERE ID=" & TRIM(Request.QueryString("Recid"))
%>
<HR>
SQL statement: <%=SQLstmt%>
<HR>
<%
conn.execute(SQLstmt)
Response.Write "Operation Complete<BR><A HREF=""moddata.asp"">Home</A>"
'If the QueryString Actionvar isn't set to anything, generate the list of items
ELSE
SQLstmt = "SELECT * FROM navigation"
%>