Microsoft VBScript 运行时错误 (0x800A000D)类型不匹配: 'CloseConn'

来源:百度知道 编辑:UC知道 时间:2024/09/21 13:35:07
源码如下:
<%
dim ComeUrl,cUrl,AdminName

AdminName=replace(session("AdminName"),"'","")
if AdminName="" then
call CloseConn() ----这行有错误
response.redirect "login.asp"
response.End()
end if
sql="select UserName from Admin where UserName='" & session("AdminName") & "' and Password='" & session("AdminPassword") & "'"
set rs=conn.execute(sql)
if rs.eof and rs.bof then
rs.close
response.Redirect("login.asp")
response.End()
end if
%>

call CloseConn() 不要去包含了。

这行改成:
conn.close
set conn=nothing

CloseConn() 过程没定义
可能性最大的是
CloseConn() 是放在一个文件里面,这个文件没有包含那个文件就直接使用这个过程或者函数