Neoview ODBC Drivers Manual (R2.5)

of a function is identifiable by the suffix W. You can use any of these functions with the Neoview
Unicode driver.
Some ODBC API functions, for example SQLBindParameter , let you declare the data type of the
argument in the function call. Such functions do not have different versions for Unicode and
ANSI.
For more information about ODBC functions that have Unicode versions, refer to the Microsoft
Developer Online Library at http://msdn.microsoft.com/en-us/library/ms716246(VS.85).aspx.
Unicode C and SQL Data Types
A Unicode-enabled application can bind a character buffer to be of either of the following types:
SQL_C_CHAR (character data)
SQL_C_WCHAR (“wide” character data)
In addition, the SQLUCODE.H header file includes a define for SQL_C_TCHAR, which is
equivalent to SQL_C_CHAR for a non-Unicode application and to SQL_C_WCHAR for a
Unicode-enabled application, depending on compiler flags you set.
Unicode also defines “wide” SQL data types. The following table lists the wide SQL data types
alongside the Neoview SQL column data types that correspond to them:
Description
Neoview SQL Column Data Type
(specified in CREATE TABLE command)SQL Unicode Type
Fixed length string, 1–32707 bytes;
number of characters depends on
national character set; length declared
in column definition
NCHARSQL_WCHAR
Variable length string, 1–32703 bytes;
number of characters depends on
national character set
NCHAR VARYINGSQL_WVARCHAR
For comprehensive information about Neoview SQL data types, see the Neoview SQL Reference
Manual.
For general information concerning Unicode data types, see the Microsoft Developer Network
Online Library at http://msdn.microsoft.com/en-us/library/ms709439(VS.85).aspx.
Unicode Driver Behavior
In most respects, the behavior of the HP Neoview Unicode driver is identical to that of the 32–bit
Windows driver described in Chapter 1 (page 15). The essential difference is in the degree of
character-set awareness:
Both drivers have the capability to translate SQL text and data based on the client locale
(character set) and the character-set configuration of the Neoview platform (ISO88591, SJIS,
or Unicode).
For Unicode applications, the driver assumes that arguments and data are encoded in UTF-16
by default.
Only the Unicode driver supports ODBC API functions that have the W (wide) suffix.
NOTE: For details about function mapping by the ODBC Driver Manager, see http://
msdn.microsoft.com/en-us/library/ms716540(VS.85).aspx
Translation of SQL statement text, input data, and output data depends on the character-set
configuration (ISO88591, SJIS, or Unicode) of the Neoview platform. However, the following
considerations apply, without regard to the character-set configuration:
48 HP Neoview Unicode Driver for Windows