The Microsoft® SQL Server™ ODBC driver maps SQL Server SQL data types to ODBC SQL data types. The illustration below shows SQL Server SQL data types and the ODBC SQL data types to which they map. It also shows ODBC SQL data types and their corresponding ODBC C data types, and the supported and default conversions.
Note The SQL Server timestamp data type maps to the SQL_BINARY or SQL_VARBINARY ODBC data type because the values in timestamp columns are not datetime values, but binary(8) or varbinary(8) values that indicate the sequence of SQL Server activity on the row. If the SQL Server ODBC driver encounters a SQL_C_WCHAR (Unicode) value that is an odd number of bytes, the trailing odd byte is truncated.