Search code examples
stringaxaptax++dynamics-ax-2009

AX2009 - str data type limit


Is there any limit on the size of the str data type in AX2009?

There is also the extended data type (Memo) which can be inherited by extended data types. What is the difference between a extended data type inherited by (Memo) and the str data type? As is not (Memo) also just a str data type?


Solution

  • For the limit: Yes and no.
    For practical purposes it is unlimited but the X++ runtime has a certain limit which you can find out by feeding large values to the strrep function until you will encounter errors.

    All EDTs based on strings are essentially 'mapped' to str in X++ but result in different column types in the database backend or different control properties when rendered in the UI.
    So when considering X++, you can treat a memo EDT as the same as str but please notice that they come from different 'realms' of AX - str is the string type of X++ which is used for building up the business logic in AX and memo is the base EDT for unlimited strings when modelling the database and UI part of AX.