delete.asp代码: <% dim key key=Request.QueryString("key")
Set Conn=Server.CreateObject("ADODB.Connection") conn.open "driver={Microsoft Access Driver (*.mdb)};dbq=" & server.mappath("装备分布.mdb") CommandText="select * from 装备分布 where [编号]=" &key Set RS=Conn.Execute(CommandText) %>
<p align="center"><b><font size="4">装备分布</font></b></p>
<table border=0 cellspacing="1" bgcolor="#808080" width="99%" style="font-size: 9pt; font-family: 宋体"> <% Response.write "<tr>" For I=0 To RS.Fields.Count-1 Response.write "<td bgcolor=#f5f5f5>"& RS(I).Name & "</td>" Next Response.write "</tr>"
While Not RS.EOF Response.write "<tr>" For I=0 To RS.Fields.Count-1 Response.Write "<td bgcolor=#ffffff>" & RS(I).Value & "</td>" Next Response.write "</tr>" RS.MoveNext Wend RS.MoveFirst
%> </table>
<html>
<head> <span style="font-size: 9pt"> <meta http-equiv="Content-Language" content="zh-cn"> <meta name="GENERATOR" content="Microsoft FrontPage 6.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>记录删除</title> </head>
</span>
<body style="text-align: center"> <p align="center"><font color="#FF0000" style="font-size: 9pt">你确定删除此条记录吗?</font></p>
<p align="center"><a href="secdelete.asp?number=<%=RS("装备编号")%>"><span style="font-size: 9pt">确定</span></a><span style="font-size: 9pt"> </span><a href="index2.htm"><span style="font-size: 9pt">取消</span></a></p>
<% RS.close conn.close %>
</body>
</html>
Microsoft VBScript 运行时错误 错误 '800a000d'
类型不匹配: 'RS'
/rj/test/zbfb/check.asp,行4
check.asp内容是:
<%
RJ_TName=Session("RJ_TName")
if RJ_TName<>"" or RJ_TName<>"李四" then
response.Redirect("delete.asp?key="&RS("编号"))
else
response.Redirect("error.asp")
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新建网页 1</title>
</head>
<body>
</body>
</html>
</html>
[此贴子已经被作者于2006-4-10 16:21:16编辑过]