HELP HELP! Automate import of a .csv file

  • Thread starter Thread starter amolchopra
  • Start date Start date
A

amolchopra

Guest
I was working on project that involved writing the data into Access database using a C program. The insert query execution was taking very long, so I decided to write to a .csv file and then import it to one of the desired tables. This worked very fast as compared to directly writing to the DB. Now I want to automate this process. The user should specify the file name at the command prompt and I want to call a script so that the script automatically imports the contents of the .csv file into the access DB. I already have connection established to the DB. All I am looking for is the script that can automatically import the .csv file into access DB. Please help me out. :confused:
 
Use the TransferText method. See Access Help for how to use it.
 
yeah! he's right.

Code:
TransferText([TransferType As AcTextTransferType = acImportDelim], [SpecificationName], [TableName], [FileName], [HasFieldNames], [HTMLTableName], [CodePage])
search it in Access help and ... goodluck:)
 

Users who are viewing this thread

Back
Top Bottom