p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Classic ASP Professional (http://p2p.wrox.com/forumdisplay.php?f=63)
-   -   How Can I Add Info From a Txt File Into a DB? (http://p2p.wrox.com/showthread.php?t=5169)

Lucy October 20th, 2003 03:31 AM

How Can I Add Info From a Txt File Into a DB?
 
Hi there

Could anyone help me with the following problem:

A website I am working on has 2 different areas to it. One section is controlled by us (databases, webpages etc) and the other section is controlled by another company, the database of which we cannot access directly.

This company has agreed to write a generic script that will send out data in a text file, with each piece of info separated by a delimiter. We would then, somehow, need to put this data into a database so that this data could be accessed onscreen using recordsets etc.

e.g. If the text file was this:
Lucy|Robinson|Web Developer|Andy|Jones|Senior Developer|

Then we would want this information to be added automatically into a database that has already been created in SQL Server

            FirstName Surname Job Title
Record 1 Lucy Robinson Web Developer
Record 2 Andy Jones Senior Developer

Does anyone know whether this is possible, and if so, can anyone help me?

I really don't know where to start with this one!

Thanks in advance.

Lucy Robinson


sal October 20th, 2003 04:54 PM

Is this SQL Server database on a server that is local to you? or is it up on a web server owned by a hosting company?

If you have access to the SQL Server and Web Server, create a dts package to import the data.
Where is this text file being saved at, at a place that you can access programatically?

Sal

Lucy October 21st, 2003 03:13 AM

Yes, the SQL Server database that we'd want the text file imported into is on our server and we'd have access to it.

Could you explain a little bit more about the 'DTS package' you mentioned? We would want the importing of this text file to happen automatically, without someone actually going into SQL server and importing manually.

The text file would be saved in a folder (or in the root directory) of our website, which we have access to.

Cheers

Lucy

sal October 21st, 2003 11:00 AM

A DTS package can be schedule from a job in SQL Server and it can be configured to run on a daily, hourly, weekly basis. It can be saved on the server or it can be saved as a visual basic file.
If you have rights to create one in SQL Server, create one and have an administrator for the Database Server schedule a job to do this for you on a daily basis. The admin may even create the package for you.








Sal


All times are GMT -4. The time now is 04:07 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.