informix
Informix Guide to GLS Functionality
Informix ESQL/C Features

Defining Variables for Locale-Sensitive Data

The SQL data types NCHAR and NVARCHAR support locale-specific data. For more information about these data types, see Using Character Data Types.

ESQL/C supports the predefined data types string, fixchar, and varchar for host variables that contain character data. In addition, you can use the C char data type for host variables. You can use these four host-variable data types for NCHAR and NVARCHAR data.

Your ESQL/C program can access columns of data types NCHAR and NVARCHAR when it selects into or reads from character host variables. The following code fragment declares a char host variable, hôte, and then selects NCHAR data into the hôte variable:

When you declare ESQL/C host variables for the NCHAR and NVARCHAR data types, note the relationship between the declared size of the variable and the amount of character data that it can hold, as follows:

For more information, see The NCHAR Data Type and The NVARCHAR Data Type.

You can insert a value that a character host variable (char, fixchar, string, or varchar) holds in columns of the NCHAR or NVARCHAR data types.


Informix Guide to GLS Functionality, Version 9.2
Copyright © 1999, Informix Software, Inc. All rights reserved