Unicode Support

The MaxDB ODBC driver supports Unicode. As of versions 7.4.03.32 / 7.5.00.11, two ODBC drivers are available per version.

MaxDB ODBC Driver

Operating System

 ODBC Driver/ASCII

 ODBC Driver/Unicode

Microsoft Windows

sqlod32.dll

sqlod32w.dll

UNIX/Linux

libsqlod.a|so

libsqlodw.a|so

The ASCII version of the ODBC driver always connects to the database kernel via ASCII.

The Unicode version of the ODBC driver connects to ASCII database kernels via ASCII and with Unicode database kernels via UCS2.

To process Unicode data, the MaxDB ODBC driver uses UCS-2 internally (i.e. two bytes). On platforms that use four bytes for WCHAR_T data, when you compile with the GNU C compiler, you can use an option to force processing of WCHAR_T data with two bytes.

Example:

gcc -fshort-wchar [...]

Applications that do not require the functions of a driver manager can be linked statically with the ODBC driver.

The following functions are defined in the MaxDB ODBC driver for access to Unicode data:

SQLBrowseConnectW

SQLColAttributesW

SQLColAttributeW

SQLColumnPrivilegesW

SQLColumnsW

SQLConnectW

SQLDataSourcesW

SQLDescribeColW

SQLDriverConnectW

SQLDriversW

SQLErrorW

SQLExecDirectW

SQLForeignKeysW

SQLGetConnectAttrW

SQLGetConnectOptionW

SQLGetCursorNameW

SQLGetDescFieldW

SQLGetDescRecW

SQLGetDiagFieldW

SQLGetDiagRecW

SQLGetInfoW

SQLGetStmtAttrW

SQLGetTypeInfoW

SQLNativeSqlW

SQLPrepareW

SQLPrimaryKeysW

SQLProcedureColumnsW

SQLProceduresW

SQLSetConnectAttrW

SQLSetConnectOptionW

SQLSetCursorNameW

SQLSetDescFieldW

SQLSetStmtAttrW

SQLSpecialColumnsW

SQLStatisticsW

SQLTablePrivilegesW

SQLTablesW