SQLSetDescField

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.

Remarks

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).

SQLSetDescField Support for Enhanced Date and Time Features

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/Time Improvements (ODBC).

SQLSetDescField Support for Large CLR UDTs

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

SQLSetDescField Support for Sparse Columns

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).

See Also

Concepts

ODBC API Implementation Details

Other Resources

SQLSetDescField