Guus2005
AWF VIP
- Local time
- Today, 13:20
- Joined
- Jun 26, 2007
- Messages
- 2,642
Hi,
I need to import 2 csv files which increase my database to almost 500MB. A primary key needs to be added to both tables and an index.
After that i connect the tables to currentdb, perform a few checks als disconnect the tables and drop the database.
So i've come up with this solution:
I want to create a new database and after that is finished i want to import a csv file in that new database.
Creating a new database is easy enough but when i import the csv file in that new database it gives an error message that the import specification can't be found.
Apparently it uses the IMEX specifications stored in the new database and obviously they are not there.
How do i export my IMEX specs to the new database?
Thanks for your time!
I need to import 2 csv files which increase my database to almost 500MB. A primary key needs to be added to both tables and an index.
After that i connect the tables to currentdb, perform a few checks als disconnect the tables and drop the database.
So i've come up with this solution:
I want to create a new database and after that is finished i want to import a csv file in that new database.
Creating a new database is easy enough but when i import the csv file in that new database it gives an error message that the import specification can't be found.
Apparently it uses the IMEX specifications stored in the new database and obviously they are not there.
Code:
Dim app As Access.Application
Set app = New Access.Application
app.OpenCurrentDatabase strDatabasename
' import the csv file into that database
app.DoCmd.TransferText acImportDelim, strImportSpecification, strTablename, strFilename, blnHasFieldNames
Thanks for your time!