注册 登录
编程论坛 ASP技术论坛

Microsoft VBScript 运行时错误 (0x800A01A8)缺少对象: '[undefined]'

dashan520 发布于 2011-05-13 06:11, 689 次点击
错误类型:
Microsoft VBScript 运行时错误 (0x800A01A8)
缺少对象: '[undefined]'
/enterprise/include/config.asp, 第 5 行

-----------------------------------
附代码:
<!--#include file="../include/adovbs.inc" -->
<%
'On Error Resume Next
'if recordset is open close it, &H00000001 = AdStateOpen
if Session("rs").state = AdStateOpen then---------------------------------------------提示的错误行
    Session("rs").close
end if

function CheckSession()
    if session("login_name") = "" or session("member_id") = "" then
        CheckSession = ""
    else
        CheckSession = Session("mode")
    end if
end function

function safeConvert(strOrig)
    dim strTemp
    if isnull(strOrig) then
        strTemp = strOrig
        'Response.Write("strOrig : [" & strOrig & "]<br>")
    else
        'Response.Write("strTemp : [" & strOrig & "]<br>")
        strTemp = Server.HTMLEncode(strOrig)
        strTemp = Replace(strTemp,chr(10),"<br>")
        strTemp = Replace(strTemp," ","&nbsp")
        strTemp = Replace(strTemp,chr(9),"&nbsp&nbsp&nbsp&nbsp")
        'strTemp = Replace(strTemp,",","&pound;&not;")
        'strTemp = Replace(strTemp,"'","&iexcl;&macr;")
        'strTemp = Replace(strTemp,"&quote","&iexcl;±")
        'strTemp = Replace(strTemp,".","&iexcl;&pound;")
    end if
    safeConvert = strTemp
end function
function convertBack(strOrig)
    dim strTemp
    strTemp = strOrig
    if not isnull(strOrig) then
        'strTemp = Replace(strTemp,"&iexcl;&pound;",".")
        strTemp = Replace(strTemp,"&iexcl;&iexcl;"," ")
        'strTemp = Replace(strTemp,"&pound;&not;",",")
        strTemp = Replace(strTemp,"<br>",chr(10))
        strTemp = Replace(strTemp,"&lt","<")
        strTemp = Replace(strTemp,"&gt",">")
        strTemp = Replace(strTemp,"&quot",chr(34))
        strTemp = Replace(strTemp,"&nbsp"," ")
    end if
    convertBack = strTemp
end function
function r2v(str)
    dim tmp
    tmp=Replace(str,rP,vP,1,-1,1)
    r2v=Replace(tmp,"\","/")
    'Response.Write r2v & "<br>" & rP & "<br>" & vP
end function

function GetWLen(str)
    dim i,l
    l = len(str)
    for i=1 to l
        if asc(mid(str,i,1)) > 255 then
            l = l + 1
        end if
    next
    GetWLen = l
end function

function SubWStr(str,start,leng)
    dim i,realLen
    realLen = 0
    for i=1 to Len(str)
        if realLen <= leng + 1 then
          if asc(mid(str,i,1)) > 255 then
        realLen = realLen + 2
      else
        realLen = realLen + 1
            end if
        else
            Exit For
        end if
    next
    SubWStr = mid(str,start,i)
end function

function CutString(str,l)
    dim strR
    strR = CStr(str)
    if GetWLen(strR) > l + 3 then
        strR = SubWStr(strR,1,l) & "..."
    end if
    CutString = strR
end function

function CutDate(sDate)
    dim arr,dateR
    dateR = Cstr(sDate)
    arr = split(dateR," ")
    CutDate = arr(0)
end function

%>
1 回复
#2
dzt00012011-05-13 08:56
哪来的代码。session有state属性吗?
1