VB6 Homeplug XML file download
Posted: Sat Aug 15, 2009 12:59 pm
I am sorry to bother you, but I have been working on this problem for 3 days now and cannot find the right piece of VB6 code.
I want to download my Plugwise XML file 4 times a minute with code:
Dim objHTTP As Object
Set objHTTP = CreateObject("MSXML2.XMLHTTP")
Dim stl As String
Dim rt
objHTTP.Open "GET", file_URL$, False, "password", "password"
objHTTP.send
rt = objHTTP.responseBody
Dim oADOStream
Set oADOStream = CreateObject("ADODB.Stream")
oADOStream.Type = 1
oADOStream.Mode = 3
oADOStream.Open
oADOStream.Write rt
oADOStream.SaveToFile xmlfilesaveto, 2 'adSaveCreateOverWrite
oADOStream.Close
Set oADOStream = Nothing
Set objHTTP = Nothing
It downloads the XML file, but downloaded file stays the same in content, only file attributes change (file save to disk time). If I check XML file via brower I see changes in XML every 5 seconds.
What should I do?
Thank you very much,
Rok Rodic
I want to download my Plugwise XML file 4 times a minute with code:
Dim objHTTP As Object
Set objHTTP = CreateObject("MSXML2.XMLHTTP")
Dim stl As String
Dim rt
objHTTP.Open "GET", file_URL$, False, "password", "password"
objHTTP.send
rt = objHTTP.responseBody
Dim oADOStream
Set oADOStream = CreateObject("ADODB.Stream")
oADOStream.Type = 1
oADOStream.Mode = 3
oADOStream.Open
oADOStream.Write rt
oADOStream.SaveToFile xmlfilesaveto, 2 'adSaveCreateOverWrite
oADOStream.Close
Set oADOStream = Nothing
Set objHTTP = Nothing
It downloads the XML file, but downloaded file stays the same in content, only file attributes change (file save to disk time). If I check XML file via brower I see changes in XML every 5 seconds.
What should I do?
Thank you very much,
Rok Rodic