asp: csv to access
- Started
- Last post
- 6 Responses
- blindpilot
i need to upload a csv via asp-upload [no problem]
i then need asp page to read the csv and enter the details into the correct field in an access database. [PROBLEM!!!]
then delete file [no problem]
can any of you coders help me??
examples/resources/snippets etc
i can read the file ok, but how should i do it? - construct an array?? if so is single dimensional array ok, or will i run into difficulties??
- mitsu0
just use something like split() to parse the csv file which will automatically put it in an array.. then loop through the array and insert each element of the array into your access table.
- blindpilot0
how would i get info into,say, four columns.
how would i construct the loop, that is
- mitsu0
is this the format of you .csv file:
value1, value2, value3, value4
value1, value2, value3, value4
value1, value2, value3, value4
value1, value2, value3, value4
value1, value2, value3, value4?
- blindpilot0
yep-how'd you know??
have you been peekin'
- mitsu0
ok then split on vbCrLf for one array,
then for each element in the array you'll split on ','
as you step through the elements, just insert them into your table.
- blindpilot0
ta mitsu - i'll let you know how i get on