Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Re: How to get the exact error when downloading a file [Thread Next] Re: How to get the exact error when downloading a fileTo: NULL Date: 2/8/2008 12:49:00 PM
Thanks.
"Martin Honnen" <mahotrash@y...> wrote in message
news:%23ZwRgtYaIHA.4172@T......
> 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/
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
