Example of binding result set columns to retrieve UCS-2 data

You can use SQLBindCol() to bind the first column of a result set to a Unicode UCS-2 application buffer.

The following code shows such an example.
/* Declare variable to bind Unicode UCS-2 data */
SQLWCHAR     UCSWSTR   [50];
/* Assume CURRENTAPPENSCH=UNICODE is set */
SQLBindCol( (SQLHSTMT) hstmt,
            (SQLUSMALLINT) 1,
            (SQLSMALLINT) SQL_C_WCHAR,
            (SQLPOINTER) UCSWSTR,
            (SQLINTEGER) sizeof(UCSWSTR),
            (SQLINTEGER*)&LEN_UCSWSTR);