Db2 ODBC API entry points
A Db2 ODBC entry point is a function that provides support for one or more application encoding schemes. Db2 ODBC supports two entry points for each function that passes and accepts character string arguments: a generic API and a wide (suffix-W) API.
The entry point that you use depends on the current encoding scheme
of your application. Use the following guidelines to choose the correct
entry points for your application:
- Use generic APIs for EBCDIC, ASCII, and Unicode UTF-8 string arguments.
Example: To specify a Unicode UTF-8 argument, call a generic API:
SQLExecDirect( (SQLHSTMT) hstmt, (SQLCHAR *) UTF8STR, (SQLINTEGER) SQL_NTS ); - Use wide (suffix-W) APIs only for Unicode UCS-2 string
arguments. Example: To specify a Unicode UCS-2 argument, call a suffix-W API:
SQLExecDirectW( (SQLHSTMT) hstmt, (SQLWCHAR *) UCS2STR, (SQLINTEGER) SQL_NTS );