The DBNLS environment variable specifies whether automatic data type conversion is supported between NCHAR and NVARCHAR database columns and CHAR and VARCHAR variables (respectively) of the client systems.
Global Language Support (GLS) does not require the DBNLS environment variable. But Dynamic Server databases continue to support the legacy behavior of DBNLS, which supports applications that manipulate tables with NCHAR or NVARCHAR columns.
>>-DBNLS--+-----+---------------------------------------------->< +-'1'-+ '-'2'-'
For UNIX systems that use the C shell, you can enable client applications such as DB-Access, IBM Informix SQL, IBM Informix 4GL, IBM Informix Dynamic 4GL, and embedded-SQL applications such as ESQL/C to convert automatically between CHAR and VARCHAR variables of the client application and NCHAR and NVARCHAR columns of the database by this command:
setenv DBNLS 1
This setting also supports the automatic conversion of values retrieved from NCHAR columns into CHAR variables, and the conversion of NVARCHAR column values into VARCHAR variables.
Similarly, when DBNLS = 1, character strings stored as CHAR variables can be inserted into NCHAR columns, and character strings stored as VARCHAR variables can be inserted into NVARCHAR database columns.
To support these features, DBNLS must also be set to 1 on the client system. This setting also enables the client system to display dates, numbers, and currency values in formats specified on the client locale.
Conversely, setting no value for DBNLS disables automatic conversion between CHAR and VARCHAR variables of the client application and NCHAR and NVARCHAR columns of the database, and also prevents Dynamic Server from using the locale files of the client system:
setenv DBNLS unsetenv DBNLS
Another possible setting for DBNLS is 2, by using this command:
setenv DBNLS 2
This supports automatic data type conversion between NCHAR and CHAR and between NVARCHAR and VARCHAR (if the client system has DBNLS set to 1 or 2). The client and the database server can have different locales.
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]