This section discusses changes to SQL Server Native Client ODBC functions to support large CLR UDTs.
SQLBindCol
UDT result column values are converted from SQL to C datatypes as as described in the "Bindings and Conversions" section, earlier in this topic.
SQLBindParameter
The values required for UDTs are as follows:
|
SQL data type
|
Parametertype
|
ColumnSizePtr
|
DecimalDigitsPtr
|
|
SQL_SS_UDT
(length less than or equal to 8,000 bytes)
|
SQL_SS_UDT
|
n
|
0
|
|
SQL_SS_UDT
(length greater than 8,000 bytes)
|
SQL_SS_UDT
|
SQL_SS_LENGTH_UNLIMITED (0)
|
0
|
SQLColAttribute
The values returned for UDTs are as described in the "Descriptor Fields for Results" section, earlier in this topic.
SQLColumns
The values returned for UDTs are as described in the "Column Metadata Returned by SQLColumns and SQLProcedureColumns (Catalog Metadata)" section, earlier in this topic.
SQLDescribeCol
The values returned for UDTs are as follows:
|
SQL data type
|
DataTypePtr
|
ColumnSizePtr
|
DecimalDigitsPtr
|
|
SQL_SS_UDT
(length less than or equal to 8,000 bytes)
|
SQL_SS_UDT
|
n
|
0
|
|
SQL_SS_UDT
(length greater than 8,000 bytes)
|
SQL_SS_UDT
|
SQL_SS_LENGTH_UNLIMITED (0)
|
0
|
SQLDescribeParam
The values returned for UDTs are as follows:
|
SQL data type
|
DataTypePtr
|
ColumnSizePtr
|
DecimalDigitsPtr
|
|
SQL_SS_UDT
(length less than or equal to 8,000 bytes)
|
SQL_SS_UDT
|
n
|
0
|
|
SQL_SS_UDT
(length greater than 8,000 bytes)
|
SQL_SS_UDT
|
SQL_SS_LENGTH_UNLIMITED (0)
|
0
|
SQLFetch
UDT result column values are converted from SQL to C datatypes as as described in the "Bindings and Conversions" section, earlier in this topic.
SQLFetchScroll
UDT result column values are converted from SQL to C datatypes as as described in the "Bindings and Conversions" section, earlier in this topic.
SQLGetData
UDT result column values are converted from SQL to C datatypes as as described in the "Bindings and Conversions" section, earlier in this topic.
SQLGetDescField
Descriptor fields available with the new types are described in the "Descriptor Fields for Parameters" and "Descriptor Fields for Results" sections, earlier in this topic.
SQLGetDescRec
The values returned for UDTs are as follows:
|
SQL data type
|
Type
|
SubType
|
Length
|
Precision
|
Scale
|
|
SQL_SS_UDT
(length less than or equal to 8,000 bytes)
|
SQL_SS_UDT
|
0
|
n
|
n
|
0
|
|
SQL_SS_UDT
(length greater than 8,000 bytes)
|
SQL_SS_UDT
|
0
|
SQL_SS_LENGTH_UNLIMITED (0)
|
SQL_SS_LENGTH_UNLIMITED (0)
|
0
|
SQLGetTypeInfo
The values returned for UDTs are as described in the "Metadata Returned by SQLColumns and SQLProcedureColumns (Catalog Metadata)" section, earlier in this topic.
SQLProcedureColumns
The values returned for UDTs are as described in the "Metadata Returned by SQLColumns and SQLProcedureColumns (Catalog Metadata)" section, earlier in this topic.
SQLPutData
UDT parameter values are converted from C to SQL datatypes as as described in the "Bindings and Conversions" section, earlier in this topic.
SQLSetDescField
Descriptor field available with the new types are described in the "Descriptor Fields for Parameters" and "Descriptor Fields for Results" sections, earlier in this topic.
SQLSetDescRec
The values allowed for UDTs are as follows:
|
SQL data type
|
Type
|
SubType
|
Length
|
Precision
|
Scale
|
|
SQL_SS_UDT
(length less than or equal to 8,000 bytes)
|
SQL_SS_UDT
|
0
|
n
|
n
|
0
|
|
SQL_SS_UDT
(length greater than 8,000 bytes)
|
SQL_SS_UDT
|
0
|
SQL_SS_LENGTH_UNLIMITED (0)
|
SQL_SS_LENGTH_UNLIMITED (0)
|
0
|
SQLSpecialColumns
The values returned for the columns DATA_TYPE, TYPE_NAME, COLUMN_SIZE, BUFFER_LENGTH, and DECIMAL_DIGTS UDTs are as described in the "Metadata Returned by SQLColumns and SQLProcedureColumns (Catalog Metadata)" section, earlier in this topic.