skip to main content
Drivers for 32-Bit and 64-Bit Platforms : The SQL Server Wire Protocol Driver : Unicode Support
 

Try DataDirect Drivers Now

Unicode Support

The SQL Server Wire Protocol driver maps the Microsoft SQL Server and Windows Azure SQL Database data types to Unicode data types as shown in the following table:
Table 32. Mapping Microsoft SQL Server and Windows Azure SQL Database Data Types to Unicode Data Types
SQL Server Data Type
Mapped to. . .
datetimeoffset1, 2
SQL_WVARCHAR
nchar
SQL_WCHAR
ntext
SQL_WLONGVARCHAR
nvarchar
SQL_WVARCHAR
nvarchar(max)3
SQL_WLONGVARCHAR
sysname
SQL_WVARCHAR
xml4
SQL_WLONGVARCHAR

1 Supported only for Microsoft SQL Server 2008 and higher, and Windows Azure SQL Database.

2 Datetimeoffset mapping changes based on the setting of the Fetch TSWTZ as Timestamp option.

3 nvarchar(max) and xml are supported for Microsoft SQL Server 2005 and higher.

4 nvarchar(max) and xml are supported for Microsoft SQL Server 2005 and higher.

The driver supports the Unicode ODBC W (Wide) function calls, such as SQLConnectW. This allows the Driver Manager to transmit these calls directly to the driver. Otherwise, the Driver Manager would incur the additional overhead of converting the W calls to ANSI function calls, and vice versa.
See UTF-16 Applications on UNIX and Linux for related details. Also, refer to "Internationalization, Localization, and Unicode" in the DataDirect Connect Series for ODBC Reference for a more detailed explanation of Unicode.
In this section: 
* Using the XML Data Type