G
gus
I import large csv or vert-bar delimited text files into MS Access 2007
(12.0.6211.1000) SP3 MSO (12.0.6320.5000). The text files are created on
UNIX servers. I import into an existing table, and the column layout of my
text file is the same as the layout of my existing table.
When I have no header record in the text file, MS Access has no problems
importing the data and appending it to my existing table.
When I have a header record in the text file, MS Access appears to attempt
to interpret the types of data in the columns even though the import is
appending to an existing table that has types defined for all columns.
Columns that have both (1) mixed numeric and TEXT data, and (2) numeric on
the first few rows (maybe 25 rows?), appear to be interpreted as numeric and
the rows with TEXT get import errors.
Also, it appears to behave differently if there is just 1 field (works OK)
versus more than 1 field (gets errors as described above).
I tested this by:
(1) create a new MS Access table TEST1 with no index and with 2 fields
named TextField1 and TextField2, both defined as TEXT.
(2) create a text csv file with 26 rows, where the first 25 rows were 0,0
and the last row was BBBB,AAAA.
(3) create a text csv file with 27 rows, where the first row is
TextField1,TextField2 and the next 25 rows were 0,0 and the last row was
BBBB,AAAA.
(4) use the import wizard to append the text file created in (2) to the
table created in (1). No errors at all reported my MS Access.
(5) use the import wizard to append the text file created in (3) to the
table created in (1), being sure to tell the import wizard that the "First
row contains field names". MS Access reports an import error on data row 26
(27 if you count the header record), which is the row that has BBBB,AAAA.
In my testing, the order in which I did steps (4) and (5) above did not
matter. The error always happened when importing the text file that had the
header.
My work around will be to eliminate the header record and make sure my text
file format exactly matches the column layout of the existing MS Access
table. I wanted to report this, as IMHO the presence/absence of a header
record should have no effect on how MS Access handles the import when
appending to an existing table.
Thanks much
Gus
(12.0.6211.1000) SP3 MSO (12.0.6320.5000). The text files are created on
UNIX servers. I import into an existing table, and the column layout of my
text file is the same as the layout of my existing table.
When I have no header record in the text file, MS Access has no problems
importing the data and appending it to my existing table.
When I have a header record in the text file, MS Access appears to attempt
to interpret the types of data in the columns even though the import is
appending to an existing table that has types defined for all columns.
Columns that have both (1) mixed numeric and TEXT data, and (2) numeric on
the first few rows (maybe 25 rows?), appear to be interpreted as numeric and
the rows with TEXT get import errors.
Also, it appears to behave differently if there is just 1 field (works OK)
versus more than 1 field (gets errors as described above).
I tested this by:
(1) create a new MS Access table TEST1 with no index and with 2 fields
named TextField1 and TextField2, both defined as TEXT.
(2) create a text csv file with 26 rows, where the first 25 rows were 0,0
and the last row was BBBB,AAAA.
(3) create a text csv file with 27 rows, where the first row is
TextField1,TextField2 and the next 25 rows were 0,0 and the last row was
BBBB,AAAA.
(4) use the import wizard to append the text file created in (2) to the
table created in (1). No errors at all reported my MS Access.
(5) use the import wizard to append the text file created in (3) to the
table created in (1), being sure to tell the import wizard that the "First
row contains field names". MS Access reports an import error on data row 26
(27 if you count the header record), which is the row that has BBBB,AAAA.
In my testing, the order in which I did steps (4) and (5) above did not
matter. The error always happened when importing the text file that had the
header.
My work around will be to eliminate the header record and make sure my text
file format exactly matches the column layout of the existing MS Access
table. I wanted to report this, as IMHO the presence/absence of a header
record should have no effect on how MS Access handles the import when
appending to an existing table.
Thanks much
Gus