PDA

View Full Version : import large CSV file(more then 80k records) to MS Access table



rahul26
07-10-2008, 05:46 AM
Hi All,
I have got a requirement that on click of a button in excel form I need to import a large CSV file with more then 80k records with some 14 columns to a table directly in MSAccess.
I am a newbie (basically a business analyst so not much coding experience)in MSAccess, so have got no idea whether its possible to implement and how the performance would be.

earlier we were importing from business object report and it was failry fast, but now have apphrehensions how the performance would be.

Please give me some sample code/macro where we can import CSV file to MSAccess table .

I know I have to us Docmd.TransferText to write the macro but not sure how to procedd.Any pointers would be highly appreciated.

Regards,
Rahul26

akanchu
07-10-2008, 06:40 PM
Though I do not have Ms-Access anymore on my machine, the command looked something like this.

DoCmd.TransferText transfertype, "YourImportSpecName", "TheTableto which you import", "Name of the file that has the data"

I think in your case the transfertype will be acExportDelim
The Importspec name will be a specification file that you should have on the database. It is helpful for importing the data to access.

Hope this helps.