报这样的错,高手帮我看看:)
------------------------------
Microsoft VBScript 运行时错误 (0x800A000D)
类型不匹配: 'clng '
/5iucn/admin/admin_newstype.asp, 第 75 行
------------------------------
if Request.ServerVariables( "REQUEST_METHOD ")= "POST " then '读出select的id值 再分别实现不同mode的javascript.function:
if not isempty(request( "sel ")) then
idlist=request( "sel ")
if instr(idlist, ", ")> 0 then
dim idarr
idArr=split(idlist)
for i = 0 to ubound(idarr)
selectid=clng(idarr(i))
call setupdate(selectid,mode)
next
else
//第75行/////////// delid=clng(idlist)
call setupdate(delid,mode)
end if
end if
selectid=0
' Response.Redirect selfhtmlname
end if
sub setupdate(id,mode)
id=cstr(id)
sqltext= "select * from "+table2+ " where id= "+id
rs.Open sqltext,cn,1,2
if not rs.EOF then
if mode= "del " then
sqltext= "select * from "+table3+ " where pid= "+cstr(rs( "id "))
rs2.open sqltext,cn,1,1
countnews=rs2.RecordCount
rs2.Close
if countnews> 0 then
Response.Write " <font color=red> 记录“ " & rs( "title ") & "”包含 " & countnews & "条子记录,不能直接删除! </font> "
'msgbox ( "不能删除 ",32, "运行时意外! ")
else
'Response.Write "del id "
rs.Delete
end if
else
if mode= "noshow " then
rs( "usefulness ")=0
else
rs( "usefulness ")=1
end if
end if
rs.Update
end if
rs.Close
'Response.End
end sub
%>
------解决方案--------------------
clng函数是把变量转为long(长整型)类型呀!
------解决方案--------------------
request( "sel ") 是不是数字型的?如果不是的话,出错就难免了