Re: CSV to access in ASP... making my head spin

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



anndr0id wrote:
I've been trying to figure this out on my own for two days and I give
up at this point. I'm creating a web administration interface, and the
user would like to be able to upload a CSV file, and have it post to
the database.

I originally tried using the microsoft text driver, and that worked
great. However, putting the CSV in an array to save the information

Why use the array? Can't you open a recordset using the text driver?

and then open the access database didn't work, because the CSV is so
huge, I'm getting out of memory errors when running the array... and
of course the client isn't interested in my ideas of why they should
change hosts.

Anyway, my problem is this. I need to find a way to add the records in
a CSV file on the server (I've already got the uploading working) to
the database, without using an array. I'm stumped

Thanks so much for any advice you can give in advance!

- Ann
I would probably do this outside of the ASP process, using the import
functionality built into Access. Why tie up an IIS thread with this
task?

However, your host might not cooperate with that plan, so, instead of
reading the whole file into an array, loop through the file one line at
a time (using ReadLine) and process it one line at a time

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


.



Relevant Pages

  • Re: Trying to build a page that will read a csv file...
    ... > I can't figure out how to get the results to display in a multi-column ... >> Use fileto load the csv file into an array. ... >> Use a loop to iterate through every element in the array, ...
    (php.general)
  • Re: Trying to build a page that will read a csv file...
    ... cough cough ) I decided it was ... I've even managed to get php to display the database ... > Use fileto load the csv file into an array. ... > Use a loop to iterate through every element in the array, ...
    (php.general)
  • Re: Load a string of CSV from memory into a dataset
    ... you should avoid writing to the disk as ... - which after decryption and just before writing to the CSV ... Then run a foreach on the resulting array and split each line (array ... the csv file is being loaded into a datatable, ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Read an Input File
    ... I'm using the code below to read a CSV file into an Array ... Line Input #1, recorddata ... But the problem is that one of the Cells in one row of my csv file contains a Carriage return character so when it comes to that cell it thinks that is the end of line and it breaks my one line to 2 lines. ...
    (microsoft.public.vb.general.discussion)
  • Re: CSV to access in ASP... making my head spin
    ... user would like to be able to upload a CSV file, ... I'm getting out of memory errors when running the array... ...
    (microsoft.public.scripting.vbscript)