Full Version: Exported Text File Does Not Match Specifications
UtterAccess Discussion Forums > Microsoft® Access > Access Automation
pamr
My company has very recently switched from using Access 2003 to using Access 2010. I have an old query that works fine in Access 2010 (once I got past the reference library errors and found the advanced option for exporting). However, this week when I exported, the output text file looked good until I saved it. When I opened the output text file, some of the field widths had changed. I even went into the specifications and retyped the problem beginning field positions and lengths and resaved it. No change. It seems to be fairly stable, but I do not understand why a field that should be 15 characters in width is 16 or why a 10 character field should now be 20 characters.

Last week when I exported this same file the layout was okay. Has anyone any idea about how to fix this?
theDBguy
Hi,

welcome2UA.gif

Are your fields' sizes limited at the table level? I mean, are you able to enter more than 10 characters in the field where you're supposed to only have 10 characters?

Just curious...
pamr
The source table is an access table, so yes, more characters can be entered in those fields.

However, I export that access table using the specifications to a text table where the fields are positional. You know, code in the first 4 positions, description in the next 10 positions - that kind of thing. Only now, instead of this:

code pos 1 - pos 4 length = 4
desc1 pos 5 - pos 14 length = 10
desc2 pos 15 - pos 19 length = 5


I am getting this:

code pos 1 - pos 6 length = 6
desc1 pos 7 - pos 16 length = 10
desc2 pos 17 - pos 40 length = 24

Some fields are longer, some are the same length, but none are shorter. Most fields are the same length but due to the fact that the fields are positional, after the first longer field shows up, none after that are where they are supposed to be. There were maybe 4 or 5 fields of the wrong length out of over 60 fields.


This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.