Skip to content

Latest commit

 

History

History
43 lines (31 loc) · 3.29 KB

File metadata and controls

43 lines (31 loc) · 3.29 KB
title SQLGetTypeInfo
description SQLGetTypeInfo
author markingmyname
ms.author maghan
ms.date 03/17/2017
ms.service sql
ms.subservice native-client
ms.topic reference
helpviewer_keywords
SQLGetTypeInfo function
apitype DLLExport

SQLGetTypeInfo

[!INCLUDESQL Server Azure SQL Database Synapse Analytics PDW]

The [!INCLUDEssNoVersion] Native Client 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.

[!INCLUDEssNoVersion] treats identity as an attribute, whereas ODBC treats it as a data type. To resolve this mismatch, SQLGetTypeInfo returns the data types: intidentity, smallintidentity, tinyintidentity, decimalidentity, and numericidentity. The SQLGetTypeInfo result set column AUTO_UNIQUE_VALUE reports the value TRUE for these data types.

For varchar, nvarchar and varbinary, the [!INCLUDEssNoVersion] Native Client ODBC driver continues to report 8000, 4000 and 8000 respectively for the COLUMN_SIZE value, even though it is actually unlimited. This is to ensure backward compatibility.

For the xml data type, the [!INCLUDEssNoVersion] Native Client ODBC driver reports SQL_SS_LENGTH_UNLIMITED for COLUMN_SIZE to denote unlimited size.

SQLGetTypeInfo and Table-Valued Parameters

The table type for table-valued parameters is effectively a meta-type-that is, a type used to define other types. Therefore, it does not have to be exposed through SQLGetTypeInfo. Applications must use SQLTables, rather than SQLGetTypeInfo, to retrieve metadata for table types used with table-valued parameters.

For more information, about retrieving metdata for table-valued parameters, see Statement Attributes that Affect Table-Valued Parameters.

For more information about table-valued parameters, see Table-Valued Parameters (ODBC).

SQLGetTypeInfo Support for Enhanced Date and Time Features

For the values returned for date/time types, see Catalog Metadata.

For more general information, see Date and Time Improvements (ODBC).

SQLGetTypeInfo Support for Large CLR UDTs

SQLGetTypeInfo supports large CLR user-defined types (UDTs). For more information, see Large CLR User-Defined Types (ODBC).

See Also

SQLGetTypeInfo Function
ODBC API Implementation Details