View Full Version : fast way to import csv files
sai_golden
12-02-2007, 07:53 AM
HI,
I want to import csv file with more than 600,000 records. I usually import it thru import wizard. Is there any other way to import it faster?
stanl
12-02-2007, 09:36 AM
HI,
I want to import csv file with more than 600,000 records. I usually import it thru import wizard. Is there any other way to import it faster?
define 'faster'
sai_golden
12-02-2007, 10:20 AM
It usually takes 45 Minutes to upload the file. I tried opening it as a link file but some of the data appears junked like "######" for dates etc.
(a) Is there any way to write a code in VBA to detect the datatype and import
(b) Is there any way to reduce the duration of import.
Thanks
stanl
12-03-2007, 05:48 PM
It usually takes 45 Minutes to upload the file. I tried opening it as a link file but some of the data appears junked like "######" for dates etc.
(a) Is there any way to write a code in VBA to detect the datatype and import
(b) Is there any way to reduce the duration of import.
Thanks
stanl
12-03-2007, 05:53 PM
It usually takes 45 Minutes to upload the file. (a) Is there any way to write a code in VBA to detect the datatype and import
(b) Is there any way to reduce the duration of import.
Thanks
for (a) - YES - use schema.ini
for (b) -hard to say, normally [in my experience] any slowdown is due to date-type translation, and for real importing, like in your instance, the Wizard probably sucks. Today I uploaded 1/4 million rows to SQL Server in under 2 seconds using ADO and OpenDataSource(). So I would recommend ADO.
.02 Stan
sai_golden
12-05-2007, 10:12 AM
Thanks Stanl
It should not take that long using VBA code.
I have posted various Import routines for importing on this forum
This is one
http://www.vbaexpress.com/forum/showthread.php?20548-How-to-import-a-text-file-with-more-than-255-fields-into-Access
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.