SQLGetTypeInfo

ODBC and SQL Server

ODBC and SQL Server

SQLGetTypeInfo

The Microsoft® SQL Server™ ODBC driver reports the additional column USERTYPE in the result set of SQLGetTypeInfo. USERTYPE reports the DB-Library data type definition and is useful to developers porting existing DB-Library applications to ODBC.

SQL Server treats identity as an attribute, whereas ODBC treats it as a data type. To resolve this mismatch, SQLGetTypeInfo returns the data types: int identity, smallint identity, tinyint identity, decimal identity, and numeric identity. The SQLGetTypeInfo result set column AUTO_UNIQUE_VALUE reports the value TRUE for these data types.