asp删除了回复消息

来源:百度知道 编辑:UC知道 时间:2024/05/25 00:43:11
当我登陆管理员后,点击删除和回复的按钮,就出现了这样的问题,帮忙下,谢谢各位啦

dell.asp
<!--#include file="conn.asp"-->
<%
if session("admin")="" then
response.redirect"login.asp"
end if
lid=(request("id"))
sql="select*from gbook where id=cint('"&lid&"')"
Dset rs=server.createobject("adodb.recordset")
rs.open sql,connstr,3,2
if not rs.eof then
rs.delete
rs.update
response.redirect"index.asp"
end if
%>
'Microsoft VBScript 运行时错误 (0x800A000D)
类型不匹配
/public/delly.asp, 第 8 行

reply.asp

<!-- #include file="conn.asp" -->
<%
if session("admin")="" then
response.redirect"index.asp"
end if
lid=request("id")
sql="select*from gbook where id=cint('"&lid&"')"

reply.asp
试下这个:
<!-- #include file="conn.asp" -->
<%
if session("admin")="" then
response.redirect"index.asp"
end if
lid=cint(request("id"))
sql="select*from gbook where id=" &lid
dset rs=server.createobject("adodb.recordset")
rs.open sql,connstr,3,2
if not rs.eof then
cname=request.form("cname")
creply=request.form("creply")
if name<>"" then
sql="select*from gbook where id=" &lid
set rs=server.createobject("adodb.recordset")
rs.open sql,connstr,3,2
rs("name")=cname
rs("reply")=creply
rs.update
response.redirect"replyok.asp"
end if
end if
%>

dell.asp
<!--#include file="conn.asp"-->
<%
if session("admin")="" then
response.redirect