Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP XMLHTTP

Status
Not open for further replies.

mickywall

Programmer
Sep 2, 2002
88
GB
When I use microsoft's xmlhttp object to retrieve a home
for example I get the error message

msxml3.dll error '800c0005'
The system cannot locate the resource specified.

I realise that the webpage doesn't exist and that this is probably causing the problem. Is there a way to skip the error? Below is a sample few lines of the code I use


On Error Goto 0
Dim objXMLHTTP, sHTML
Set objXMLHTTP = Server.CreateObject("Microsoft.XMLHTTP")
objXMLHTTP.Open "GET", sRecipURL, False
objXMLHTTP.Send
sHTML=objXMLHTTP.StatusText
If err Or sHTML="OK" Then


thanks.
 
Try this:

Code:
On error resume next

Dim objXMLHTTP, sHTML 
Set objXMLHTTP = Server.CreateObject("Microsoft.XMLHTTP")
objXMLHTTP.Open "GET", sRecipURL, False
objXMLHTTP.Send
sHTML=objXMLHTTP.StatusText

if err > 0 then
   Response.write "There was an error. " & err.message
end if

I haven't tested it but I have used this method before for trapping.

Cassidy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top