Import Deleimited file fails after 25 lines

  • Thread starter Thread starter Jay Kay
  • Start date Start date
J

Jay Kay

I don't know why but when I import a tab delimited file
(41 lines long), the data gets pulled in correctly for the
first 25 lines and then truncates fields after the 25th
line.

Huh?

Thanks
Jay
 
Post examples of the original and imported data. Are you sure that the other
lines have tab character as the delimiter?
 
HI Ken

Since the info is from the DoD side, I can't give you
pieces of the before and after.

When I import the txt file (with "|" delimiters in the
text file) into ACCESS, I change the delimiter to "|".
ACCESS then places vertical lines at every delimiter as I
would expect while using the Wizard. It all looks good
good until I hit "Finish" and the first 25 lines or so are
fine, but the last 16 lines loses data from field 20 or so
to the last field (54).

Again, the field vertical lines look fine all the way down
to last record.
 
If you see the pipe | character in the wizard window where the data show
after you select it, then the pipe is not the delimiter in the text file.
The Wizard will replace the pipe with vertical spacing lines that go all the
way through the sample data shown in the window; it won't continue to show
the actual delimiter.

It's difficult to diagnose without seeing sample of the text file's data;
can't you open it in a text editor and copy some rows?
 
Ken,

I have read that ACCESS reads about 15-20 records and then assumes
thereafter that the fields are set. My data in fields 16-59 do not appear
until line 25 or so. Thus ACCESS will never be able to see it. The only work
around is to concatenate a dummy text file with stuff in fields 16-59, thus
forcing ACCESS to import those fields to EOF.

Jay




--
*******************Confidentiality and Privilege Notice*******************
This email is intended only to be read or used by the addressee. It is
confidential and may contain legally privileged information. If you are not
the addressee indicated in this message (or responsible for delivery of the
message to such person), you may not copy or deliver this message to
anyone, and you should destroy this message and kindly notify the sender by
reply email. Confidentiality and legal privilege are not waived or lost by
reason of mistaken delivery to you
 
That's very possible as an explanation. An alternative would be to use VBA
code to read and import the file's data one line at a time, but inserting a
"full" row into the data may be easier. Good luck.
 
Jay said:
I don't know why but when I import a tab delimited file
(41 lines long), the data gets pulled in correctly for the
first 25 lines and then truncates fields after the 25th
line.

Try adding a "MaxScanRows=n" line to your schema.ini file, where "n" is the
number of lines you want the text driver to scan when determining the column
types. The default is 25. 0 scans the entire file. See
http://msdn.microsoft.com/library/en-us/odbc/htm/odbcjetschema_ini_file.asp
for details.

-Greg.
 
Back
Top