Download file from Internet | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Download file from Internet

Hi all, I’m being asked to create a scheduled DTS package that download a file from a http site, for example http:/ I’ve found solutions for this but when you have a FTP site. Any help will be appreciated! Thanks! Marcela Read the above thread to get the answer… MohammedU.
Thanks!! I found another problem that was the proxy. This is the code I used to solve that. I hope it helps to anybody that have the same problem. Regards, ‘************************************************************************
‘ Visual Basic ActiveX Script"
Function Main() Dim url, xmlhttp, responseBody
url = ""
Set xmlhttp = CreateObject("Msxml2.XMLHTTP.3.0")
xmlhttp.Open "GET", url, False, "userproxy", "passproxy"
xmlhttp.Send responseBody = xmlhttp.responseBody
Set xmlhttp = Nothing
Dim oADOStream
Set oADOStream = CreateObject("ADODB.Stream")
oADOStream.Type = 1 ‘(binary)
oADOStream.Mode = 3 ‘(read / write)
oADOStream.Write responseBody
oADOStream.SaveToFile ""
Set oADOStream = nothing Main = DTSTaskExecResult_Success
End Function