hello
I got a text file C:\mydata.txt
the fields are separated by commas.
I was just wondering how to import it into a table "myDataTable" programatically
I used the following lines
DoCmd.RunSQL "DELETE * FROM RATES"
filename = "C:\mydata.txt"
DoCmd.TransferText acImportFixed, "myData Import Specification", "myDataTable", filename
The funny thing is, when I manually import mydata.txt into myDataTable, using the above previously defined specs, it works perfectly fine. When I use the code above, it imports the comas (which are defined as separators in myData Import Specs) as part of the text, and the number fields are all over the place shifted.

I got a text file C:\mydata.txt
the fields are separated by commas.
I was just wondering how to import it into a table "myDataTable" programatically
I used the following lines
DoCmd.RunSQL "DELETE * FROM RATES"
filename = "C:\mydata.txt"
DoCmd.TransferText acImportFixed, "myData Import Specification", "myDataTable", filename
The funny thing is, when I manually import mydata.txt into myDataTable, using the above previously defined specs, it works perfectly fine. When I use the code above, it imports the comas (which are defined as separators in myData Import Specs) as part of the text, and the number fields are all over the place shifted.