ESQL/C allows the use of non-ASCII characters in host variables when the following conditions are true:
You must ensure that the C compiler supports use of non-ASCII characters in C source code. For information about how to indicate the support that your C compiler provides for non-ASCII characters, see Invoking the ESQL/C Filter.
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 indHome | [ Top of Page | Previous Page | Next Page | Contents | Index ]