A field name appears encoded, or linking fails
In a linked table, a field is named something like Pos_x002E_ Nr_x002E_ instead of Pos. Nr., or
Access stops linking and asks for a column that doesn't exist.
Environment
Access and DAO; columns whose name in the database contains special characters or is longer than 64 characters.
Cause
OData allows only letters, digits, and the underscore in names; a service must encode other
characters (R&I becomes R_x0026_I). The driver translates the names back for Access – except for
the characters at which Access refuses a link, even through the SQL Server driver:
| Name contains | Result |
|---|---|
!, ", ., [, ], `, control characters, leading space | the field appears with the encoded character, for example Pos_x002E_ Nr_x002E_ – through the SQL Server driver, the table couldn't be linked at all |
any other character, including umlauts, &, /, -, inner spaces | the field is named as in the database |
| more than 64 characters | Access truncates the name and doesn't find the column – as through the SQL Server driver |
Resolution
- For fields that appear encoded, use the displayed name; values, filters, and writing work unchanged.
- If you want a readable name, create a view with an alias in the database (
SELECT [Pos. Nr.] AS PosNr …) and link the view. - For names over 64 characters, this is the only way: a view with a shorter alias.
Verification
The linked table or view opens, and the fields show the same values as in the database.
Related topics
en/wiki/data-conectivity/odata-odbc/troubleshooting/field-name-encoded-or-too-long.txt · Last modified: by Wolfgang van der Stille