Re: INSERT 8bit chars
Posted in 1998
Pascal Dreer wrote:
> Does anybody know how to INSERT 8bit chars (e.g., ''') into Informix
> On-Line 7.22 ?
> I tried to change the environment vars (DB_LOCALE etc.) but I always get
> the error
> '-202 An illegal character has been found in the statement'. BTW: It
> does work
> with ESQL/C.
>
> Thanks for any help,
> Pascal
Pascal,
What you have to do is to set up the environment for GLS (DB_LOCALE ...) or
NLS (DBLANG ...) *before* you create the database. Then, if you set
CLIENT_LOCALE (if GLS, or DBLANG if NLS) for the client (e.g. dbaccess,
isql, PC-clients) it will work for the national characters. It still will
not work for other 8-bit characters.
Notes:
1) you may insert any character in an ESQL environment (as you have seen) as
long as the values are supplied in variables.
2) you can only insert "language-compliant" characters if the values are
supplied directly in the SQL statement.
3) you can see the difference in some PC-client environments (as
PowerBuilder) that support both methods.
4) You should not insert a X"00" as the first character of a CHAR field by
method 1) as it indicates a NULL value. If the X"00" is not the first
character, it is ok.
Regards
Helmut Leininger
Bull AG / Vienna
Unix Support
Email: Helmut.Leininger@bull.net