problems with datatypes Navision in SQL

This is because the ODBC driver is incorrectly exposing Code and Decimal as a fixed-length CHAR data type instead of a VARCHAR. With a CHAR, every value has the same length, which is the maximum defined length of the field. With a VARCHAR, the lengths of each value can be different. C/ODBC is telling the OLEDB provider for ODBC, that this code field is CHAR and therefore every value will have the same length; when OLEDB finds a value of a different (smaller) length it complains. I’m afraid theres nothing to be done about it unless C/ODBC is fixed. This error is still present in the latest driver version.