data import

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Something happened to my PC: I have an Access macro for importing AS400 files in txt format. Everything worked fine. Since I got my new PC I can't import the file anymore. Everything is in one field and ignores all septerators. I use 'import deliminated' without any specifications. Do I need to generate this? How can I do it? I have no option when I'm importing the file using the file menu manually. Thanks, Guenther
 
Hi Guenther,

Did you get a newer version of Access with your new PC?

Recent versions of Access require that textfiles use CR+LF (i.e. Chr(13)
& Chr(10)) for line breaks. Older versions (e.g. Access 97) would often
accept Unix files (LF only) or Mac files (CR only).

Try opening one of the AS400 files in Notepad. If it shows little square
boxes instead of linebreaks, it means there is something other than
CR+LF. Alternatively, view the file in a hex editor such as Hexedit.

If this is the problem, you'll need to either:

1) get your IT people to modify the AS400 (best!)

2) use a utility program to pre-process the file before you import it
(there are many such programs, e.g. at Simtel or Tucows)

3) write Access VBA to parse and import the file (too much work!)
 
Back
Top