DTS to get *.CSV files through SSL or Https

  • 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.

     

  • 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

  • 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