| title | SQLSetDescField | Microsoft Docs | |
|---|---|---|
| ms.custom | ||
| ms.date | 03/17/2017 | |
| ms.prod | sql-server-2016 | |
| ms.reviewer | ||
| ms.suite | ||
| ms.technology |
|
|
| ms.tgt_pltfrm | ||
| ms.topic | reference | |
| helpviewer_keywords |
|
|
| ms.assetid | de4bed15-15be-4825-994c-1046255e725a | |
| caps.latest.revision | 23 | |
| author | JennieHubbard | |
| ms.author | jhubbard | |
| manager | jhubbard |
[!INCLUDESNAC_Deprecated]
SQLSetDescField can be used to set descriptor fields for table-valued parameters and table-valued parameter columns. For information about the available fields, see Table-Valued Parameter Descriptor Fields and Descriptor Fields for Table-Valued Parameter Constituent Columns.
Table-valued parameter columns are only available when the descriptor header field SQL_SOPT_SS_PARAM_FOCUS is set to the ordinal of a record that has SQL_DESC_TYPE set to SQL_SS_TABLE. For more information about SQL_SOPT_SS_PARAM_FOCUS, see SQLSetStmtAttr.
If an attempt is made to set SQL_SOPT_SS_PARAM_FOCUS to the ordinal of a parameter that is not a table-valued parameter, SQLSetStmtAttr returns SQL_ERROR, and a diagnostic record is created with SQLSTATE = HY024 and the message "Invalid attribute value". SQL_SOPT_SS_PARAM_FOCUS is not changed when SQL_ERROR is returned.
Setting SQL_SOPT_SS_PARAM_FOCUS to 0 restores access to descriptor records for parameters.
For more information about table-valued parameters, see Table-Valued Parameters (ODBC).
Date/time features have been enhanced in ODBC. For information about the descriptor field provided for the new date/time types, see Parameter and Result Metadata.
For more information, see Date and Time Improvements (ODBC).
SQLSetDescField supports large CLR user-defined types (UDTs). For more information, see Large CLR User-Defined Types (ODBC).
SQLSetDecField can be used to set SQL_SOPT_SS_NAME_SCOPE in the application parameter descriptor (APD) to the values SQL_SS_NAME_SCOPE_EXTENDED and SQL_SS_NAME_SCOPE_SPARSE_COLUMN_SET.
For more information, see Sparse Columns Support (ODBC).