In article <04f101c3a4c7$24bfe9b0$a401280a (AT) phx (DOT) gbl>, HL <hliu10 (AT) cox (DOT) net>
writes
Quote:
Is there any way to download the text file from website:
(http://www.federalreserve.gov/releas...ist/dat00_sd.t
xt)
into SQL Server using DTS package?
Thank you |
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