SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Mar 2005
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Need help with CSV upload into database

    Hello,

    I am trying to develop a web site in which the user can add records to the database from an admininstration section of the site. I'm using an access database (there will only be about 60 or so records at any time). I can create a page that makes the user fill out a form to add a record like the sample below...but I'd also like a place where the user can just upload a CSV file directly into the database. Can someone please help me? I don't know a lot about ASP, but I'm planning on doing it in DMX. I would greatly appreciate any feedback.

    Sample Here

  2. #2
    SitePoint Member
    Join Date
    Mar 2005
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think I can get the upload to work. I really need help with the code to import a csv file into my database. It would overwrite all information.. Anyone?

  3. #3
    SitePoint Wizard
    Join Date
    Nov 2004
    Location
    Nelson BC
    Posts
    2,310
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm not sure if ADO has any objects that allow you to directly import a CSV file - anyone?

    If not, you'd need to parse the CSV yourself and update the DB using a bunch of INSERTs (this is not too hard).

    How is your CSV file laid out? Quotes as delimiters? like...

    "field 1","field 2","field3"
    "thing 1","thing 2","thing 3"

  4. #4
    SitePoint Member
    Join Date
    Mar 2005
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, it is exactly like that.

    I have another quick question. Someone told me that if I link my CSV and my database...then I could upload a CSV file with the same name and it will overwrite it each time, thus updating my database. Is that possible?

    I really appreciate your help!!


Bookmarks

Posting Permissions

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