-----Original Message-----
Hi Bob,
I'm pretty sure that this is because the file is too big for Access's
import routines to handle. Depending on what's in the file, it may even
contain more data than can be contained in an Access database (max size
2GB, including tables, indexes and all).
But most big text files contain a lot of wasted space and/or redundant
data, and can be munged at the textfile level into something more
compact and importable. For instance, if it's a fixed-width file with
mostly empty fields, converting to a delimited format can dramatically
reduce its size. If you can get it down to say 1 GB total you can then
think in terms of of splitting that into a dozen or more smaller files
that can be imported one at a time, giving you a big but not totally
unmanageable table. Minimise the number of indexes on this table while
you're importing.
Also, few big text files are fully normalised; if there are repeating
fields (e.g. a group of fields for each month of the year) or redundant
data (e.g. the same contact details being repeated in multiple records)
it's possible to normalise them into a separate table, further reducing
the amount of data.
In fact it's possible to normalise data at the textfile stage, into
multiple tables contained in separate smaller textfiles which can more
easily be imported.
Tools for the above:
-Perl (
http://www.activestate.com) for just about any kind of textfile
processing, including conversion from fixed width to csv
-Unix textutils such as "split" (one file into a number of shorter
ones), "cut" (extract a subset of fields), "nl" (add line numbers for a
primary key), "sort", and "uniq" (dump duplicated lines); Windows
versions at
http://unxutils.sourceforge.net
Post back with more information about the file (but please don't attach
it to your message<g>).
On Wed, 29 Oct 2003 19:02:30 -0800, "Bob"
I'm using Access 2000 and trying to import a .txt file
that's more than 2 GB in size. But I get an error message
that says the file has no data. Is this because the .txt
file is too big? And if so, is there a way I can break it
apart and bring it in as separate tables in pieces?
--
John Nurick [Microsoft Access MVP]
Please respond in the newgroup and not by email.
.