DB2 Version 9.7 for Linux, UNIX, and Windows

MapCharToWChar CLI/ODBC configuration keyword

Specifies the default SQL type associated with SQL_CHAR, SQL_VARCHAR, SQL_LONGVARCHAR.

db2cli.ini keyword syntax:
MapCharToWChar = 0 | 1
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()