dbTalk Databases Forums  

Text Import using web address

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


Discuss Text Import using web address in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
billyg@vicksburg.org
 
Posts: n/a

Default Text Import using web address - 09-16-2005 , 10:13 AM






I'm using a DTS package to import a text file. Everything works
properly locally during the testing using a text file on my desktop.
But now I need to be able to import the text file from a web address.
The user will FTP the text file to the web site and I need to then
import that file.

The Source location in the package for the text file will not accept
http: or ftp: web addresses. The text file and SQL database are on the
same server.

Any ideas on how to point the source to a web address?


Reply With Quote
  #2  
Old   
Shawn Ferguson
 
Posts: n/a

Default Re: Text Import using web address - 09-16-2005 , 10:35 AM






Can you use ftp at all? If so, try this. First create a batch file that gets to the ftp server.
---start batch file batch.bat---
ftp
open ftp <server>
<username>
<password>
<cd directory> to directory with file unless it's at the root
<lcd change local directory> where it will place file
get <filename>
quit
---end batch file---
Then, use xp_cmdshell to run that batch.bat file in a stored procedure . It's is how I have used it in the past and has worked flawlessly. Hopefully that helps, let me know if you have morequestions about it. www.sqldts.com will also help.

Shawn
Quote:
billyg (AT) vicksburg (DOT) org> 09/16/05 11:13 AM
I'm using a DTS package to import a text file. Everything works
properly locally during the testing using a text file on my desktop.
But now I need to be able to import the text file from a web address.
The user will FTP the text file to the web site and I need to then
import that file.

The Source location in the package for the text file will not accept
http: or ftp: web addresses. The text file and SQL database are on the
same server.

Any ideas on how to point the source to a web address?



Reply With Quote
  #3  
Old   
David J. Cartwright
 
Posts: n/a

Default Re: Text Import using web address - 09-16-2005 , 10:54 AM



not sure if this would work, but its what i might try if i had to....

use a "my network places" ftp folder to get at the file (you may have to
make a way to ensure the folder is available to the agent account, or it may
not work at all)

<billyg (AT) vicksburg (DOT) org> wrote

Quote:
I'm using a DTS package to import a text file. Everything works
properly locally during the testing using a text file on my desktop.
But now I need to be able to import the text file from a web address.
The user will FTP the text file to the web site and I need to then
import that file.

The Source location in the package for the text file will not accept
http: or ftp: web addresses. The text file and SQL database are on the
same server.

Any ideas on how to point the source to a web address?




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.