菜鸟提问
<table width= "100% " border= "0 " cellpadding= "0 " cellspacing= "1 " bgcolor= "#CCCCCC ">
<tr align= "center " bgcolor= "#EEF7FF ">
<td width= "14% "> TESTID </td>
<td width= "16% "> COUNTID </td>
<td width= "16% "> <span class= "STYLE8 "> Category </span> </td>
<td width= "15% "> <span class= "STYLE8 "> Quest Code
<label> </label>
</span> </td>
<td width= "15% "> <span class= "STYLE8 "> Scale Code
<label> </label>
</span> </td>
<td width= "12% "> 修改 </td>
<td width= "12% "> 删除 </td>
</tr>
<%do while not rs.eof%>
<tr align= "center " bgcolor= "#EEF7FF ">
<td> <%=rs( "TESTID ")%> </td>
<td> <%=rs( "COUNTID ")%> </td>
<td> <%=rs( "CF_CAT_CODE ")%> </td>
<td> <%=rs( "CF_Q_TYPE ")%> </td>
<td> <%=rs( "CF_S_TYPE ")%> </td>
<td> <a href=deleate.asp?TESTID= <%=rs( "TESTID ")%> > 删除 </a> </td>
</tr>
</table>
————————————————————————————————
<%
TESTID=request( "TESTID ")
COUNTID=request.Form( "COUNTID ")
set conn=server.createobject( "adodb.connection ")
conn.open application( "dsn ")
sql= "delete tblCate where TESTID= ' " & TESTID & " 'and COUNTID= ' "&COUNTID1& " ' "
response.Write sql
response.End
conn.execute(sql)
conn.close
set conn=nothing
response.write "删除成功!2秒后返回 "
%>
为什么COUNTID没传过来值?
删除语句写的对吗?为什么删不掉记录!
------解决方案--------------------你用这个传变量的?
<td> <a href=deleate.asp?TESTID= <%=rs( "TESTID ")%> > 删除 </a> </td>
哪里有传CountID?
而且你用的是QuestString传递的参数,应该用
TestID=request.QuestString( "TestID ")
request.form是取表单参数的
------解决方案--------------------你点 删除得时候 没有提交数据阿
你就用