Internationalization, Localization, and Unicode : Unicode and Non-Unicode ODBC Drivers : Default Unicode Mapping : Connection Attribute for Unicode

Connection Attribute for Unicode
If you do not want to use the default Unicode mappings for SQL_C_WCHAR, a connection attribute is available to override the default mappings. This attribute determines how character data is converted and presented to an application and the database.
You can set this attribute before or after you connect. After this attribute is set, all conversions are made based on the character set specified.
For example:
rc = SQLSetConnectAttr (hdbc, SQL_ATTR_APP_WCHAR_TYPE, (void *)SQL_DD_CP_UTF16, SQL_IS_INTEGER);
SQLGetConnectAttr and SQLSetConnectAttr for the SQL_ATTR_APP_WCHAR_TYPE attribute return a SQL State of HYC00 for drivers that do not support Unicode.
This connection attribute and its valid values can be found in the file qesqlext.h, which is installed with the product.
For the SQL Server Legacy Wire Protocol driver, this attribute is supported only on UNIX and Linux, not on Windows.

© 2013 Progress Software Corporation and/or its subsidiaries or affiliates.