MapCharToWChar CLI/ODBC and IBM data server driver configuration keyword
Specifies the default SQL type associated with SQL_CHAR, SQL_VARCHAR, SQL_LONGVARCHAR.
- db2cli.ini keyword syntax:
- MapCharToWChar = 0 | 1
- IBM® data server driver configuration file (db2dsdriver.cfg) syntax:
- <parameter name="MapCharToWChar" 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 default SQL type representation for SQL_CHAR, SQL_VARCHAR and SQL_LONGVARCHAR is used.
- Equivalent connection attribute:
- SQL_ATTR_MAPCHAR
- Usage notes:
- MapCharToWChar controls the SQL type that is returned when describing SQL_CHAR, SQL_VARCHAR and
SQL_LONGVARCHAR columns or parameter markers. Set MapCharToWChar as follows:
- 0 - to return the default SQL type representation
- 1 - to return SQL_CHAR as SQL_WCHAR, SQL_VARCHAR as SQL_WVARCHAR, and SQL_LONGVARCHAR as SQL_WLONGVARCHAR
Only the following CLI functions are affected by setting MapCharToWChar:- SQLColumns()
- SQLColAttribute()
- SQLDescribeCol()
- SQLDescribeParam()
- SQLGetDescField()
- SQLGetDescRec()
- SQLProcedureColumns()