Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Error: VBScript runtime (0x800A01A8) Object required: '[object]'

Reply
Thread Tools

Error: VBScript runtime (0x800A01A8) Object required: '[object]'

 
 
Carolyn Speakman
Guest
Posts: n/a
 
      07-16-2004
Hi,

I'm trying to amend an intranet .asp page but keep getting this error.
The error only occurs when I pull the WHOLE intranet off the server
and try to run it locally. The error isn't there when the page is run
off the intranet server.

I'm using IIS 5, I.E. 6 and WinXP Pro.

Here's the code it doesn't like:

<%
cookieUsrUID = 0
'response.cookies("cookiePassCode") = 0
cookieUsrUID = request.cookies("cookieUsrUID")

' Get the URL for the RSS file first from the form, then from the
Cookie
RSS_URL = Request.Form("headlineURL")
If RSS_URL = "" Then
RSS_URL = Request.Cookies( "headlineURL" )
Else
Response.Cookies( "headlineURL" ) = RSS_URL
Response.Cookies( "headlineURL" ).Expires = "Dec 31, 2010"
End If
If RSS_URL = "" Then
' If it has not been defined, default it to the BBC front
page
RSS_URL = "http://news.bbc.co.uk/rss/newsonline_uk_edition/front_page/rss091.xml"
Response.Cookies( "headlineURL" ) = RSS_URL
Response.Cookies( "headlineURL" ).Expires = "Dec 31, 2010"
End If

%>

<!-- BLAH BLAH BLAH -->

<%
Set rssData = Server.CreateObject("MSXML2.DomDocument.4.0")
rssData.async = False
rssData.Load( RSS_URL )
If rssData.parseError.errorCode <> 0 Then
response.write reason
End If
Set rssHeader = rssData.getElementsByTagName("channel")

<!-- DOESN'T LIKE THIS LINE -->
lastUpdated = rssHeader.item(0).childNodes(4).text
<!-- ********************** -->

Set rssContent = rssData.getElementsByTagName("item")
rssRows = rssContent.length
%>

Any help would be greatly appreciated as I've been sat here for days!!

Thanks,
Carolyn
 
Reply With Quote
 
 
 
 
Keith M. Corbett
Guest
Posts: n/a
 
      07-30-2004
"Carolyn Speakman" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> <!-- DOESN'T LIKE THIS LINE -->
> lastUpdated = rssHeader.item(0).childNodes(4).text
> <!-- ********************** -->


The VBScript runtime error "Object required" is roughly equivalent to an
invalid pointer exception in other languages.

The code assumes that rssHeader.item(0) returns a valid object (let's call
it X), and ditto for X.childNodes(4). Either of these method calls could
"fail" and return the null value. OTOH I forget how VBScript represents the
null value; you should be able to glean this info from any VBScript
reference.

Add some error checking, and/or take a look at the data, ie., experimental
values for the channel element and its sub-elements. See whether these
methods are returning valid objects, and if not, why not. The documentation
for MSXML DOM may be helpful in this regard.

Clearly your test runs on the server and local machine are getting data that
is structured differently. Perhaps this clue in and of itself will point to
a solution.

Hope this helps.

/kmc


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Microsoft VBScript runtime error '800a01b6' Object doesn't support avi ASP General 2 11-22-2009 01:53 PM
Microsoft VBScript runtime error '800a01b6' Object doesn't suppor GTN170777 ASP General 27 07-16-2009 03:50 PM
I get the following error: Microsoft VBScript runtime error '800a01ad' why? Computer Support 2 04-27-2006 11:00 PM
Microsoft VBScript runtime error '800a01c9' PaulieS ASP .Net 1 11-28-2005 10:19 PM
Microsoft VBScript runtime error '800a0046' Stephen Chau MCSE 3 12-17-2003 08:50 PM



Advertisments