dbTalk Databases Forums  

Download a text file from internet in DTS

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


Discuss Download a text file from internet in DTS in the microsoft.public.sqlserver.dts forum.



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

Default Download a text file from internet in DTS - 11-06-2003 , 06:36 PM






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



Reply With Quote
  #2  
Old   
Darren Green
 
Posts: n/a

Default Re: Download a text file from internet in DTS - 11-09-2003 , 09:03 PM






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



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.