August 22, 2011 at 10:02 am
Hi I need to make a HTTP GET from a script task, I'm not using not Activex Script because I' not that familiar with it.
My test code is this:
Dim strURL, oBrowser
Dim serverPath
Dim scriptPath
serverPath = "http://www.hr-technologies.com/content/"
scriptPath = "page.asp"
strURL = serverPath & scriptPath
oBrowser = CreateObject("Microsoft.XMLHTTP")
oBrowser.Open("GET", strURL, False, "", "")
oBrowser.send()
msgbox(oBrowser.responsetext)
oBrowser = Nothing
Main = DTSTaskExecResult_Success
But I'm getting an error on the CreateObject call, my guess is that I'm not including the correct refernces - but I dont know how to fix.
Any help most welcome!
Thanks
Allen
August 24, 2011 at 9:43 am
August 24, 2011 at 9:54 am
Thanks CozyRoc, I hadnt thought of the MSXML installation. Is that Ivan?
August 24, 2011 at 9:58 am
January 4, 2013 at 3:55 am
Dim strURL, oBrowser
Dim serverPath
Dim scriptPath
serverPath = "http://www.hr-technologies.com/content/"
scriptPath = "page.asp"
strURL = serverPath & scriptPath
oBrowser = CreateObject("Microsoft.XMLHTTP")
oBrowser.Open("GET", strURL, False, "", "")
oBrowser.send()
msgbox(oBrowser.responsetext)
oBrowser = Nothing
Main = DTSTaskExecResult_Success
Hi Allen,
To use above the code u need to add the following refrence in your VBScript
Imports Microsoft.VisualBasic.Compatibility.VB6 and add the dll (Microsoft.VisualBasic.Compatibility.dll) in your reference.
To check if your code is working fine in debug mode, set 'PrecompileScriptIntoBinaryCode' to false and from SSIS project properties set 'run64bitruntime' to false
Thanks
Sam
January 4, 2013 at 5:28 am
Hi Sam, thanks for this. I'm going to give it try and will post back.
Happy New Year!
Allen
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply