简体   繁体   English

正在获取“ Microsoft VBScript运行时错误'800a01a8'”

[英]Getting “Microsoft VBScript runtime error '800a01a8'”

I had inherited a website to do general maintenance on. 我继承了一个网站进行常规维护。 The web pages are ASP pages but the bulk of my work has been with the html/css. 网页是ASP页,但是我的大部分工作都使用html / css。 The site has been working fine for a number of years, that is until now. 该网站已经运行了好几年,直到现在。 When I try to load pages that are containing VB script I receive the following error: 当我尝试加载包含VB脚本的页面时,出现以下错误:

Microsoft VBScript runtime error '800a01a8' Microsoft VBScript运行时错误'800a01a8'

Object required: '[object]' 所需对象:“ [object]”

/new_products.asp, line 12 /new_products.asp,第12行

the name of the asp page changes based on the page that is being called, but the line reference is the same. asp页面的名称根据所调用的页面而变化,但行引用相同。

The code that is generating the error is as follows: 生成错误的代码如下:

        Dim objXMLHTTP
    Dim coordinates
    Set objXMLHTTP = Server.CreateObject("Microsoft.XMLHTTP")
    ip = Request.ServerVariables("REMOTE_ADDR")
    objXMLHTTP.Open "GET", "http://www.ippages.com/xml/?ip="&ip&"&get=country", False
    objXMLHTTP.Send
    Set xmldoc = objXMLHTTP.responseXML
    country = xmldoc.selectSingleNode("ip_address/lookups/lookup_country").text
    set objXMLHTTP=nothing

    theCountry = Trim(UCASE(country))


    If theCountry = "CA-CANADA" then
        Bags = "13.99"
        SB4Pack = "14.00"
        currency_code = "CAD"
        lc = "CA"
        Pref = "$"
        ShipType = 1
    ElseIf theCountry = "US-UNITED STATES" then
        Bags = "13.99"
        SB4Pack = "14.00"
        currency_code = "USD"
        lc = "US"
        Pref = "$"
        ShipType = 2
    Else
        Bags = "8.00"
        SB4Pack = "11.00"
        currency_code = "GBP"
        lc = "UK"
        Pref = "£"
        ShipType = 2
    End If

With my extremely limited knowledge of VB I have done my best to try and figure out why the code has stopped working, but I am stumped. 由于我对VB的了解极为有限,我已尽力尝试找出代码为何无法正常工作的原因,但我为此感到困惑。 Any and all help is greatly greatly appreciated. 任何帮助都将不胜感激。

Since this is an environment specific issue which started to popup recently as you mentioned... No sure statement can be provided. 由于这是特定于环境的问题,正如您提到的那样,该问题最近才开始弹出...无法提供肯定的声明。 You need to investigate it. 您需要对其进行调查。 What one can do is to suggest some thing. 一个人可以做的是建议一些事情。 I believe your problem is one of this statement. 我相信您的问题就是此声明之一。

Set xmldoc = objXMLHTTP.responseXML
country = xmldoc.selectSingleNode("ip_address/lookups/lookup_country").text

Probably this value is not coming or Null or Nothing.Try to print the value of country if it's coming as Null, Nothing... Later when you try to change the case of country.... You can use tools to capture the Http request and response tools like Fidler to verify what is coming in lookup_country as a value or whether you are getting this node or not. 可能此值不为Null或Null或Nothing。尝试将国家/地区的值打印为Null,Nothing ...稍后再尝试更改国家/地区的大小写时。...可以使用工具捕获Http诸如Fidler之类的请求和响应工具,以验证lookup_country中即将出现的值或是否获取此节点。

Also where is theCountry is declared. 另外其中theCountry声明。 If it's dynamic variable then check if some one enabled OptionExplicit?? 如果它是动态变量,则检查是否有一个启用了OptionExplicit?

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Microsoft VBScript运行时错误'800a01a8' - Microsoft VBScript runtime error '800a01a8' 是什么导致Microsoft VBScript运行时错误'800a01a8' - What's causing Microsoft VBScript runtime error '800a01a8' ASP ADO连接Microsoft VBScript运行时错误'800a01a8' - asp ADO connection Microsoft VBScript runtime error '800a01a8' Microsoft VBScript运行时错误'800a01a8':必需的对象 - Microsoft VBScript runtime error '800a01a8' : object required 创建对象时的经典ASP Microsoft VBScript运行时错误'800a01a8' - Classic ASP Microsoft VBScript runtime error '800a01a8' when Creating Object 为什么我在从第 3 方 API 加载 XML 时收到“800a01a8”Object 必需错误? - Why am I getting a '800a01a8' Object required error when loading XML from 3rd party API? 如何在VBScript(经典ASP)中解决运行时错误('800a01a8')? - How to resolve runtime error ('800a01a8' ) in VBScript (classic ASP)? VBScript运行时错误'800a01a8'所需对象: - VBScript runtime error '800a01a8' Object required: VBScript运行时错误'800a01a8',所需对象:使用WScript.Quit时 - VBScript runtime error '800a01a8', Object required: '' when using WScript.Quit 将经典ASP站点移至新服务器,现在在Conn.Execute中返回“ VBScript运行时错误'800a01a8'对象必需” - Moved a Classic ASP site to a new server, now “VBScript runtime error '800a01a8' Object required” returned on Conn.Execute
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM