เขียน form to delete feedback ค่ะ แต่ได้ error ว่า
Microsoft OLE DB Provider for ODBC Drivers (0x80040E10)
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
/da/feeddel.asp, line 10
นี่คือโค้ดนะค่ะ จากหน้า feeddel.asp นะค่ะ
<% @Language=VBScript%>
<%
dim con
set con=server.createobject("ADODB.connection")
con.connectionstring="DSN=tour"
con.open
set rs=server.createobject("adodb.recordset")
b=request.querystring("a")
sql="select * from feedback where fid="& b --->คิดว่าบางทีตรงนี้อาจทำให้เกิด error
rs.open sql,con,2,3
fid=rs.fields(0)
date=rs.fields(1)
uname=rs.fields(2)
phone=rs.fields(3)
email=rs.fields(4)
comment=rs.fields(5)
%>
<form action="check_feeddel.asp" method="post" name="feedback" id="feedback">
<p align="center"><font color="hotpink" size="5" face="comic sans ms"><u>Feedback/Comment</u> </font></p>
<p align="center"><font color="hotpink" size=4>You have chosen to delete the following feedback</font></p>
<table width="715" border="0" align=center cellspacing=10 cellpadding=10>
<tr>
<td width=215><div align="right"><font color="hotpink" size=4>Feedback ID : </font></div></td>
<td width=550><input name="fid" type="text" id="name" maxlength="20" value="<%=fid%>"></td>
</tr>
<tr>
<td width=215><div align="right"><font color="hotpink" size=4>Name : </font></div></td>
<td width=550><input name="name" type="text" id="name" maxlength="20" value="<%=uname%>"></td>
</tr>
<tr>
<td width=215><div align="right"><font color="hotpink" size=4>Phone no. : </font></div></td>
<td width=550><input name="fphone" type="text" id="fphone" maxlength="20" value="<%=phone%>"></td>
</tr>
<tr>
<td><div align="right"><font color="hotpink" size=4>E-mail : </font></div></td>
<td><input name="femail" type="text" id="femail" maxlength="50" value="<%=email%>"></td>
</tr>
<tr>
<td><div align="right"><font color="hotpink" size=4>Comments/Suggestion : </font></div></td>
<td><textarea name="comment" cols="40" rows="5" id="comment"><%=comment%></textarea></td>
</tr>
<tr>
<td colspan="2"><div align="center">
<input type="submit" name="Submit" value="Delete">
</form>
<%
set con=nothing
set cmd=nothing
set rs=nothing
%>
<% @language=vbscript%>
<%
dim con
set con=server.createobject("ADODB.connection")
con.connectionstring="DSN=tour"
con.open
set rs=server.createobject("adodb.recordset")
delid=request.form("fid")
duname=request.form("name")
sql ="select * from feedback where fid="&delid
rs.open sql,con,2,3
rs.delete
response.redirect "delfeed_suc.asp"
set con=nothing
set cmd=nothing
set rs=nothing
%>
<html>