0

I have the following tab delimited file: text file

And this Access table: access table

When I go through the "Get External Data - Text File" procedure, everything works. But, when I go through the same procedure with the added step of saving a specification file (because I want to automate this task), I get an error because it is not putting my data into the right fields.

here is my specification file: spec

And here is the error I'm getting: error

And here's what happens (data in the wrong columns): table

Any help would be greatly appreciated!

Community
  • 1
  • 1
skihansen
  • 83
  • 1
  • 2
  • 8
  • I'm confused. The image of your data above does not match up with the image of your data description. For example, FeatureTypeID is not listed in both as the 2nd field and there are other mismatches too. (I had to zoom into the image of the data to see this. I was starting to recreate the problem here when I got stopped at this point.) Also the data has numbers where you say you are importing DataEntryDate. I can imagine this would cause a problem. Please update your question. – Elliptical view Dec 23 '13 at 21:04

1 Answers1

0

I think the AutoNumber ID field is your problem here, being in that it lies in the middle of your incoming literal data. Note the error message talking about "key" violations.

If you must have an AutoNumber field in your base table when you are importing then make sure it is positioned to the right of the very last data coming in, so it doesn't get stomped on. In other words if you are sucking in:

a  b  c
d  e  f

That's ok, so long as the table you are sucking it into is:

field1  Text
field2  Text
field3  Text
field4  AutoNumber

But this incoming data will generate an error into the above table:

a  b  c  x
d  e  f
Elliptical view
  • 3,338
  • 1
  • 31
  • 28
  • I removed the auto-number ID, and created a composite key, and I'm still getting the same error. Again, the import works fine if I skip the step of saving an import specification. – skihansen Dec 20 '13 at 21:34