Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: How to get the exact error when downloading a file

From: Martin Honnen <mahotrash@-----.-->
To: NULL
Date: 2/7/2008 2:14:00 PM

DPM wrote:
> Hi,
> 
> I use the following to download a file from an url.
> Is there any way to get hold of the error message.
> 
> 
> 
> loXMLHTTP = CREATEOBJECT("MSXML2.XMLHTTP")
> loXMLHTTP.Open("GET", "http://10.10.10.253/DownloadFile/Cad/Test.pdf",.F.)
> loXMLHTTP.Send()
> lcData = loXMLHTTP.ResponseBody
> STRTOFILE(lcData, "Test.pdf")
> 
> 
> loXMLHTTP.Status, return 404 if the file could not be downloaded
> loXMLHTTP.Status, returns 200 if the file was successfully downloaded
> 
> How can I get the relevant error message ?

I think you are looking for
   loXMLHTTP.statusText
see the MSXML SDK documentation 
<URL:http://msdn2.microsoft.com/en-us/library/ms759127(VS.85).aspx>


-- 

	Martin Honnen --- MVP XML
	http://JavaScript.FAQTs.com/


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent