Microsoft VBScript 运行时错误 '800a000d'类型不匹配: 'dvhtmlencode' news_save.asp
本人新手,实在是不知道怎么解决 各位大神帮帮忙!!!就是这一行
Title=dvhtmlencode(Title)
<!--#include file="conn.asp"-->
<!--#include file="admin.asp"-->
<!--#include file="Inc/Function.asp"-->
<!-- #include file="Inc/Head.asp" -->
<%
ID=Request.Form("ID")
Title=request.form("Title")
BigClassName=request.form("BigClassName")
SmallClassName=request.form("SmallClassName")
Content=request.form("Content")
FirstImageName=request.form("DefaultPicUrl")
AddDate=request.form("AddDate")
Hits=request.form("Hits")
Action=request("Action")
if BigClassName="" then
founderr=true
errmsg=errmsg+"<li>未指定新闻所属大类</li>"
end if
if Title="" then
founderr=true
errmsg="<li>新闻标题不能为空</li>"
end if
if Content="" then
founderr=true
errmsg=errmsg+"<li>新闻内容不能为空</li>"
end if
if founderr=false then
Title=dvhtmlencode(Title)
if AddDate<>"" and IsDate(AddDate)=true then
AddDate=CDate(AddDate)
else
AddDate=now()
end if
if Hits<>"" then
Hits=CLng(Hits)
else
Hits=0
end if
set rs=server.createobject("adodb.recordset")
select case Action
case "Add"
sql="select * from News where (id is null)"
rs.open sql,conn,1,3
rs.addnew
call SaveData()
rs.update
rs.close
set rs=nothing
response.redirect "News_Manage.asp"
case "Modify"
if ID<>"" then
sql="select * from News where id="&ID
rs.open sql,conn,1,3
if not (rs.bof and rs.eof) then
call SaveData()
rs.update
rs.close
set rs=nothing
response.redirect "News_Manage.asp"
else
founderr=true
errmsg=errmsg+"<li>找不到此新闻,可能已经被删除。</li>"
call WriteErrMsg()
end if
else
founderr=true
errmsg=errmsg+"<li>不能确定ID的值</li>"
call WriteErrMsg()
end if
Case else
founderr=true
errmsg=errmsg+"<li>没有选定参数</li>"
call WriteErrMsg()
end select
call CloseConn()
else
WriteErrMsg
end if
%>
<%
sub SaveData()
rs("Title")=Title
rs("Content")=Content
rs("User")=User
rs("BigClassName")=BigClassName
rs("SmallClassName")=SmallClassName
rs("AddDate")=AddDate
rs("last_time")=AddDate+time()
rs("Hits")=Hits
end sub
%>
[ 本帖最后由 honglian123 于 2012-3-30 17:12 编辑 ]