高手指点,为何总是无法加入新的记录!
最近在学的改页面,发现有个现有的代码中,无法加入新的记录请高手指点:set rs2=server.createobject("adodb.recordset")
sql0="select * from [FOX_category] where category='"&trim(request("category"))&"'"
rs2.open sql0,conn,1,3
if rs2.eof then
rs.addnew
rs("parentid")=0
rs("category")=trim(request("category"))
rs("categoryorder")=trim(request("paixu"))
rs("hide")=0
rs.update
response.write "<li>添加大类成功。"
response.write "<meta http-equiv=refresh content=""1;URL=shangjialb.asp"">"
rs2.close
set rs2=nothing
else
response.write "<li>错误,名称已经存在!"
rs2.close
set rs2=nothing
response.write "<meta http-equiv=refresh content=""2;URL=shangjialb.asp"">"
response.end
end if
这段代码的执行是也没有错误提示,也没有加入新的记录,不知为什么??