Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to automate importing a text file to sql from web server

Status
Not open for further replies.

noonan59

Programmer
Oct 27, 2003
29
0
0
US
I'm working on an asp.net application and I would like to be able to upload a text file to the web server, and then tell sql server to go get the uploaded text file and import it into a new table. After the table has been created and imported into sql, the asp.net application will then regain control and work with this new table.

This web app will be running on multiple web servers so I would need to pass along the web server name and also the file location and name.

How can I automate this process? Can I do this through a stored procedure? Or is there another way to make it work?

Thanks for any advice!
 
Have you looked at DTS ?

[bandito] [blue]DBomrrsm[/blue] [bandito]

[blue]Software code, like laws and sausages, should never be examined in production[/blue][black] - [/black][purple]Edward Tenner[/purple]
 
Yeah I figured that I need to set up a DTS. But I'm not sure how to write a stored procedure that passes the web server name and file location info to the DTS and then executes the DTS.
 
in dts look at the tasks - there is an FTP task which I think is the one you need - you can then provide this task all the details and schedule the DTS to run as often as you like by saving it right clicking on it and select schedule package.

[bandito] [blue]DBomrrsm[/blue] [bandito]

[blue]Software code, like laws and sausages, should never be examined in production[/blue][black] - [/black][purple]Edward Tenner[/purple]
 
thanks, I'll check it out. Can I call this ftp task from my application and pass in the web server name and file location from my web program? I don't want to schedule the package on an regular interval, but instead I would like my web program to somehow call this task and execute the package right after it loads a text file to the web server. I have to do this because I need to work with the new table in my web program's execution as soon as it's saved to sql.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top