勋章制度:关于asp的问题

来源:百度文库 编辑:查人人中国名人网 时间:2024/05/20 03:26:40
<!--#include file="conn.asp"-->
<%Dim info
dim inputinfo
dim sql,rs
inputinfo=request.form("word")
SQL="Select delword From delword Order By delno Desc"
Set RS=Server.CreateObject("ADODB.Recordset")
RS.Open SQL,conn,1,1
if rs.eof then
response.write "对不起,没有记录"
else
Do While Not RS.Eof
info=RS("delword")
inputinfo=replace(inputinfo,info,"")
RS.MoveNext
Loop
rs.close
set rs=nothing
end if
response.write(inputinfo)%>
意思就是说我呢,info这个变量的东西不是从数据库里调用出来的吗,inputinfo这个变量不是输进去的吗,只要inputinfo中出现info这个变量的,都代替掉,就是删掉了
这个功能就不能实现,这是为什么啊

要在rs.movenext前加一个rs.update来更新数据,不然数据只写在缓存中了。