![]() |
|
The mi_type_maxlength() function obtains the maximum length of a data type from its type descriptor.
type_desc | is a pointer to the type descriptor from which mi_type_maxlength() obtains the maximum length. |
The mi_type_maxlength() function obtains the maximum length of the data type from the type descriptor that type_desc references. The maximum length applies to the built-in data types VARCHAR and LVARCHAR. For extended data types, the maximum length is the value of the maxlen column of the sysxtdtypes system catalog table.
The NVARCHAR data type also has a maximum length.
If you call mi_type_maxlength() on some other data type, the function returns zero (0).
>=0 | is the maximum length of the data type in the type_desc type descriptor. |
MI_ERROR | indicates that the function was not successful. |
See the descriptions of the following functions: mi_type_align(), mi_type_byvalue(), mi_type_element_typedesc(), mi_type_full_name(), mi_type_length(), mi_type_owner(), mi_type_precision(), mi_type_qualifier(), mi_type_scale(), mi_type_typename(), and mi_typedesc_typeid().