Uploading and Updating the database

Results 1 to 3 of 3

Thread: Uploading and Updating the database

  1. #1
    Shawn Kubik Guest

    Default Uploading and Updating the database

    I&#039;m not sure whether this is the most appropriate location to post this question, but since it has a great deal to do with the database itself, I figure it can&#039;t hurt. :^)<BR><BR>I&#039;m writing a relatively small client database application in ASP. The database is an Access 2000 database that resides on the network server, which runs NT4 and IIS4. I&#039;m developing the system under Win98 using PWS.<BR><BR>What I want to do is be able to have a page in the application that I can use to upload a text file (.txt), that is output from another application containing client information in some formatted manner. I know that I can import the contents of the text file directly in Access itself, but I would like to automate the process whereby I can upload the text file to the ASP application, and have it automatically update the tables in the database with the new data in the text file.<BR><BR>Is there any way of doing this?<BR><BR>Thanks,<BR><BR>- Shawn Kubik.

  2. #2
    Eddie Campbell Guest

    Default RE: Uploading and Updating the database

    Here is one way that I have used.<BR><BR>Create a sample text file and link it into the database on your server. Note that you will have to make sure that the path to the linked file matches the path on your server (E.g. C:inetpubwwwrootMyAppDataImportfile.Txt)<BR><BR>Th en when the new text file is uploaded, simply overwrite the existing one and Access will automatically pick up the data.<BR><BR>As the text file is now linked to the database, you can run update queries using it as if it were a native Access table.

  3. #3
    peterjl@austec.net.au Guest

    Default RE: Uploading and Updating the database

    Of course it is possible!<BR><BR>But it might require a bit more programming than for desktop Accessdb. The simples way would be a comma delimited file with one record per line. You would read in the file one line at a time and then use the split function to break the line up into fields. <BR><BR>If you are just inserting new rows then you could just build an SQL Insert command with the values, and execute it. <BR><BR>If you are updating you would need to identify the unique key and update the corresponding row of the table.<BR><BR>You would do either in a loop.<BR><BR>To go into this in more details would require me to write you application for you. This I am not prepared to do. I hope that my brief overview of the concept will be helpful.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts