Groups | Blog | Home
all groups > sql server dts > november 2003 >

sql server dts : Download a text file from internet in DTS


HL
11/6/2003 4:36:11 PM
Is there any way to download the text file from website:

(http://www.federalreserve.gov/releases/H10/hist/dat00_sd.t
xt)

into SQL Server using DTS package?

Thank you

Darren Green
11/10/2003 3:03:30 AM
In article <04f101c3a4c7$24bfe9b0$a401280a@phx.gbl>, HL <hliu10@cox.net>
writes
[quoted text, click to view]

There is nothing native within DTS that can handle Http calls.

Use the ServerXMLHTTP component included in MS XML 4. Here is a simple
sample of a GET request as you might perform one inside an ActiveX
Script Task in DTS. It supports POST as well, so you can send and
receive. It is also fully aware of XML which is nice if that is what you
are transferring.

Get the MSXML SDK (help file) or search MSDN for full details of
ServerXMLHTTP.


Dim xmlHTTP
Dim sURL

sURL = "http://someotherserver/respond.asp?Param1=" &
DTSGlobalVariables("MyVar").Value

Set xmlHTTP = CreateObject ("MSXML2.ServerXMLHTTP.4.0")
xmlHTTP.open "GET",, False
xmlHTTP.send ()
MsgBox xmlHTTP.responseXML.xml


--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org
AddThis Social Bookmark Button