dbTalk Databases Forums  

Execute ASP page from DTS

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Execute ASP page from DTS in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Rossco
 
Posts: n/a

Default Execute ASP page from DTS - 08-09-2005 , 12:07 AM






Hi All, Many Thanks in Advance.

We are attempting to use the following code to execute an asp page from a
sql dts. The problem is the with the xmlServerHttp.send() line we are
receiving a connection with the server cannot be made. Is there either a
simple error in the code or a better way of doing this?

Cheers - Rossco

Function Main()
Dim xmlServerHttp

Set xmlServerHttp = CreateObject("Msxml2.ServerXMLHTTP.4.0")


xmlServerHttp.SetOption 2, 13056 ' Ignore all SSL errors
xmlServerHttp.open "POST",
"https://10.20.16.40/faws/taxivoucher/tv_email_form.asp", False
xmlServerHttp.setRequestHeader "Content-Type", "text/html"

'error comes when it attempts to send
xmlServerHttp.send ()



Set objStream = CreateObject("ADODB.Stream")
objStream.Type = 1
objStream.Open
objStream.Write xmlServerHttp.ResponseBody
objStream.SaveToFile "C:\NY.ZIP", 2
Set xmlServerHttp = Nothing
Set objStream = Nothing
Main = DTSTaskExecResult_Success

End Function


Reply With Quote
  #2  
Old   
Mark [exmsft]
 
Posts: n/a

Default Re: Execute ASP page from DTS - 08-09-2005 , 03:31 PM






"Rossco" <Rossco (AT) discussions (DOT) microsoft.com> wrote

Quote:
Hi All, Many Thanks in Advance.

We are attempting to use the following code to execute an asp page from a
sql dts. The problem is the with the xmlServerHttp.send() line we are
receiving a connection with the server cannot be made. Is there either a
simple error in the code or a better way of doing this?

Cheers - Rossco
I'm assuming that if you paste that URL into a browser on the machine
running the DTS package that the page loads fine. If that is the case,
check the proxy settings for getting to the target server; you may have to
run proxycfg to get the proxy settings correct.

thanks,
mark




Reply With Quote
  #3  
Old   
Joby John
 
Posts: n/a

Default Re: Execute ASP page from DTS - 08-17-2005 , 02:12 PM





Have you tried to use just

Server.CreateObject("Msxml2.ServerXMLHTTP") ?

*** Sent via Developersdex http://www.developersdex.com ***

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.