informix
Informix DataBlade API Programmer's Manual
DataBlade API Function Descriptions

mi_type_maxlength()

The mi_type_maxlength() function obtains the maximum length of a data type from its type descriptor.

Syntax

Usage

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).

Return Values

>=0 is the maximum length of the data type in the type_desc type descriptor.
MI_ERROR indicates that the function was not successful.

Related Topics

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().


Informix DataBlade API Programmer's Manual, Version 9.2
Copyright © 1999, Informix Software, Inc. All rights reserved