OleDbReturnCharAsWChar CLI/ODBC and IBM data server driver configuration keyword

Controls how the IBM® Db2® OLE DB Provider describes CHAR, VARCHAR, LONG VARCHAR, and CLOB data.

db2cli.ini keyword syntax:
OleDbReturnCharAsWChar = 0 | 1
IBM data server driver configuration file (db2dsdriver.cfg) syntax:
<parameter name="OleDbReturnCharAsWChar" value="0 | 1"/>
Attention: The IBM data server driver configuration file (db2dsdriver.cfg) syntax is available in Db2 11.5.4 and later.
Default setting:
The IBM Db2 OLE DB Provider describes CHAR, VARCHAR, LONG VARCHAR, and CLOB data as DBTYPE_WSTR.
Usage notes:
 

The IBM Db2 OLE DB Provider describes CHAR, VARCHAR, LONG VARCHAR, and CLOB data as DBTYPE_WSTR by default as of Db2 Version 8.1.2. The CLI/ODBC configuration keyword OleDbReturnCharAsWChar allows you to change this default to have the previously stated character data types reported as DBTYPE_STR.

The available settings are:
  • 0 - CHAR, VARCHAR, LONG VARCHAR, and CLOB data are described as DBTYPE_STR, and the code page of data in ISequentialStream is the local code page of the client
  • 1 - CHAR, VARCHAR, LONG VARCHAR, and CLOB data are reported as DBTYPE_WSTR, and the code page of data in ISequentialStream is UCS-2