no whitespace on end of string when copying

conception_native_0123

Well-known member
Local time
Today, 15:28
Joined
Mar 13, 2021
Messages
1,923
when I copy text from the web into an access table directly using the clipboard, and I take with me some whitespace on the end of the string, it disappears when the text is put into the table. why is this? is this just how access works? alternatively, if I copy whitespace in front of the string, it *does* copy into the table.
 
Access removes trailing spaces. However I think it might retain them when the text is added using an Update query
 
Access text data types are variable length. You can specify a max, but the min is 0. There is no reason to store trailing "blanks" and doing so will actually cause more trouble than letting them disappear.

At one point I was importing a file created by the mainframe. It was fixed format text so the first field was 8 characters, the second was 2, the third was 12, etc,. When you import a file like that, the trailing blanks will be imported as long as you have allow ZLS set to true. Once the ZLS characters are in the table, they act like characters and must be accounted for. After fighting with this for a day, I linked to the table and used Trim() to remove the offending ZLS before I appended the data.
 

Users who are viewing this thread

Back
Top Bottom