J
JumboShrimps
This codes links all .csv files in a
directory to my database.
For some reason, even though the "A2Import"
spec exists, and the specification does work
when the .csv files
are linked manually (there are hundreds of them,
so that's not possible) - when I place the
cursor over the "A2Import" in debug mode,
I get "Empty".
I need to read the column headers (and have the field
types match the specification) in the .csv file,
and without the Import specification,
it's not happening. All .csv files in the
directory ARE successfully linked,
with column headers F1,F2,F3,F4, etc instead
of the right column names, and with incorrect
column formats.
dim strCSVFileName as string
strCSVFileName = Dir("G:\Data\*.csv")
Do While strCSVFileName <> ""
DoCmd.TransferText acLinkDelim, A2Import, strCSVFileName,
strCSVFileName
strCSVFileName = Dir()
Loop
directory to my database.
For some reason, even though the "A2Import"
spec exists, and the specification does work
when the .csv files
are linked manually (there are hundreds of them,
so that's not possible) - when I place the
cursor over the "A2Import" in debug mode,
I get "Empty".
I need to read the column headers (and have the field
types match the specification) in the .csv file,
and without the Import specification,
it's not happening. All .csv files in the
directory ARE successfully linked,
with column headers F1,F2,F3,F4, etc instead
of the right column names, and with incorrect
column formats.
dim strCSVFileName as string
strCSVFileName = Dir("G:\Data\*.csv")
Do While strCSVFileName <> ""
DoCmd.TransferText acLinkDelim, A2Import, strCSVFileName,
strCSVFileName
strCSVFileName = Dir()
Loop