Size on Math Numeric data types

BOster

BOster

Legendary Poster
Does the size parameter for a given Data Dictionary item that is type Math Numeric really mean anything? On MS SQL server at least the size doesn't make any difference on the data type of the underlying DB table. In C code it doesn't really matter. What stops me from storing 1,000,000 in a MN size 6 DD item?
 
Not only in C-code, but also in Event Rules, as I experienced once again earlier today as it happens. So yeah, confused a bit myself as well by this.
 
If a DD size 6 has 1,000,000 at database level, then wherever that data item is used, such as in a form, it would display as 999,999. Also, I think, when this value is passed through a parameter, it could only hold max 999,999 value. So, if you are computing/manipulating that value, you will have issues.
 
Nothing stops you from storing more then what is a display value in DD, but it wouldn't appear as such in an application that uses that DD.

For example, if you sql in a value of 1,000,000 in a DD that can hold max 6 digits, it would be displayed at 999,999 on a form using that DD. This could cause other issues such as calculation/manipulation/user inputs that would otherwise expect 1,000,000 value.
 
Back
Top