Home | Previous Page | Next Page   IBM Informix ESQL/C Features (ESQL/C) > Handling Non-ASCII Characters >

Using Non-ASCII Characters in Host Variables

ESQL/C allows the use of non-ASCII characters in host variables when the following conditions are true:

ESQL/C applications can also support non-ASCII characters in comments and SQL identifiers. For more information, see Non-ASCII Characters in Identifiers.

The following code fragment declares an integer host-variable that contains a non-ASCII character in the host-variable name and then selects a serial value into this variable:

/*
   This code fragment declares an integer host variable
   "hôte_ent", which contains a non-ASCII character in the
   name, and selects a serial value (code number in the
   "numéro" column of the "abonnés" table) into it.
*/

EXEC SQL BEGIN DECLARE SECTION;
   int hôte_ent;
...
   
   
EXEC SQL END DECLARE SECTION;
...


EXEC SQL select numéro into :hôte_ent from abonnés
   where nom = 'Ötker';

If the client locale supports the non-ASCII characters, you can use these characters to define indicator variables, as the following example shows:

EXEC SQL BEGIN DECLARE SECTION;
   char   hôtevar[30];
   short  ind_de_hôtevar;
EXEC SQL END DECLARE SECTION;

You can then access indicator variables with these non-ASCII names, as the following example shows:

:hôtevar INDICATOR :hôtevarind

:hôtevar   :hôtevar   ind

$hôtevar      $hôtevar   ind
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]