留言板上传后,数据库无法插入记录.
用的sohu的空间,asp的留言板上传后无法插入记录.没有办法添加留言.报错如下:
===========================================================
ADODB.Recordset 错误 '800a0cb3 '
当前 Recordset 不支持更新。这可能是提供者限制的,也可能是选定的锁定类型限制的。
/guestbook/index.asp,行562
============================================================
出错附近的代码,也不知道是这段代码的原因吗?
dim rs,sql,guestip
guestip=trim(Request.ServerVariables( "HTTP_X_FORWARDED_FOR "))
if guestip= " " then
guestip=trim(Request.ServerVariables( "REMOTE_ADDR "))
end if
Set rs=Server.CreateObject( "ADODB.RecordSet ")
sql= "Select * from words "
rs.Open sql,conn,1,3
第562行 rs.AddNew
rs( "name ")=Server.HTMLEncode(guest)
rs( "sex ")=sex
rs( "qq ")=Server.HTMLEncode(qq)
if not (from= " " and from2= " ") then
rs( "where ")=Server.HTMLEncode(trim(from& " "&from2))
end if
rs( "web ")=Server.HTMLEncode(homepage)
rs( "email ")=Server.HTMLEncode(email)
rs( "admin ")=foradmin
rs( "temper ")=Server.HTMLEncode(temper)
rs( "word ")=Server.HTMLEncode(words)
rs( "ip ")=guestip
if viewpwd <> " " and foradmin=1 then
rs( "re_pwd ")=viewpwd
end if
rs.Update
rs.Close
Set rs=Nothing
[解决办法]
必须在服务器上改