November 9, 2005 at 4:00 pm
We have a project to setup DTS package to get *.CSV format file through a secure https site. I look in to the DTS help. There is no such task function. Anyone has comment? Thank you.
November 9, 2005 at 5:19 pm
The is no task in DTS that will do this.
I did a Google search and came up with the following
URL="target URL" TEMPPATH = "C:\test\" OUTPUTFILE = TEMPPATH & Mid(URL, InStrRev(URL, "/") + 1) Const ForReading = 1 , ForWriting = 2 , ForAppending = 8 Set fsoMain = CreateObject("Scripting.FileSystemObject") Set objHTTP = CreateObject("WinHttp.WinHttpRequest.5.1") Set fsResults = fsoMain.OpenTextFile(OUTPUTFILE,ForWriting, True) Call objHTTP.Open("GET", url, False) objHTTP.Send For i = 1 To lenb(objHTTP.ResponseBody) fsResults.write Chr(Ascb(midb(objHTTP.ResponseBody,i,1))) Next fsResults.Close()
This is from http://www.visualbasicscript.com
http://www.visualbasicscript.com/m_27114/mpage_1/key_/tm.htm#27677
--------------------
Colt 45 - the original point and click interface
February 23, 2006 at 8:04 pm
It works! Thank you.
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply