informix
INFORMIX-ESQL/C Programmer's Manual
ESQL/C Function Library

rtypwidth()

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.

Syntax

Usage

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.

Return Codes

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.

Example

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.

Output


INFORMIX-ESQL/C Programmer's Manual, Version 9.21
Copyright © 1999, Informix Software, Inc. All rights reserved