![]() |
|
The rtypwidth() function returns the minimum number of characters that a character data type needs to avoid truncation when you convert a value with an SQL data type to a character data type.
sqltype | is the integer code of the SQL data type. For more information, see Data Type Constants. |
sqllen | is the number of bytes in the data file for the specified SQL data type. |
Informix provides the rtypwidth() function for use with the sqlda structure that a DESCRIBE statement initializes. The sqltype and sqllen components correspond to the components of the same name in each sqlda.sqlvar structure.
0 | The sqltype is not a valid SQL data type. |
> 0 | The return value is the minimum number of characters that the sqltype data type requires. |
This sample program is in the rtypwidth.ec file in the demo directory.
For a complete listing of the exp_chk() function, see Guide to the exp_chk.ec File or refer to the exp_chk.ec file for a listing of this exception-handling function.