mediasmyth
IS-IT--Management
I have a web site that uses a CSV file provided by a third party that I've imported into an ACCESS DB table. I'd like to automate the process of updating the ACCESS table using VBscript on ASP page.
Here's what I'd like the VBscript to do...
***********
Check for presence of the CSV file
If present then... (if not present Exit)
Compare file date of CSV file with ACCESS DB table file date
If CSV file is newer then...
Import CSV data into ACCESS table (overwriting the existing table)
If CSV file date is the same or older - then Exit
Compact the ACCESS table
EXIT
***********
Notes & Questions:
1) VBscript should run automatically once a day. (say 2:00am)
2) The ACCESS table has Indexes on four fields. Will the Import preserve these?
3) Some Field lengths of CSV file are longer than the ACCESS table field length (i.e. 255 characters to 30 characters in ACCESS table). The ACCESS table fields are already set to the correct length & data type.
4) CSV file is fairly small (300 to 400 records)
Any help or divine guidance would be greatly appreciated.
- mediasmyth
Here's what I'd like the VBscript to do...
***********
Check for presence of the CSV file
If present then... (if not present Exit)
Compare file date of CSV file with ACCESS DB table file date
If CSV file is newer then...
Import CSV data into ACCESS table (overwriting the existing table)
If CSV file date is the same or older - then Exit
Compact the ACCESS table
EXIT
***********
Notes & Questions:
1) VBscript should run automatically once a day. (say 2:00am)
2) The ACCESS table has Indexes on four fields. Will the Import preserve these?
3) Some Field lengths of CSV file are longer than the ACCESS table field length (i.e. 255 characters to 30 characters in ACCESS table). The ACCESS table fields are already set to the correct length & data type.
4) CSV file is fairly small (300 to 400 records)
Any help or divine guidance would be greatly appreciated.
- mediasmyth