March 2, 2005 at 8:03 am
One of my data vendors only provides the data file through a web interface. So I created an ASP page that will grab the file and save it to the hard drive on my server.
I moved this into an Active X script in a DTS package and it just seems to hang.
Sub SubGet_Data(varURL, varFile)
Set xmlhttp = CreateObject("Msxml2.SERVERXMLHTTP")
xmlhttp.Open "GET", varURL, false
xmlhttp.Send(Now)
'Create a Stream
Set adodbStream = CreateObject("ADODB.Stream")
'Open the stream
adodbStream.Open
adodbStream.Type = 1 'adTypeBinary
adodbStream.Write xmlhttp.responseBody
adodbStream.SaveToFile varFile, 2 'adSaveCreateOverWrite
adodbStream.Close
Set adodbStream = Nothing
Set xmlhttp = Nothing
End Sub
March 3, 2005 at 12:21 am
What is the Now in the xmlhttp.Send(Now) line ? I suppose it should be xmlhttp.Send() ...
March 3, 2005 at 12:56 pm
What I was told by Microsoft Tech support when I ran into this problem was that SQL Server 2000 has a bug with this line:
Set xmlhttp = CreateObject("Msxml2.SERVERXMLHTTP")
It can create other objects just fine, except this one! Go figure.
hth
frank
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply