2.2.5.5.2 Common Language Runtime (CLR) Instances
The following data type definition stream is used for UDT_INFO in TYPE_INFO. This data type was introduced in TDS 7.2.
-
DB_NAME = B_VARCHAR ; database name of the UDT SCHEMA_NAME = B_VARCHAR ; schema name of the UDT TYPE_NAME = B_VARCHAR ; type name of the UDT MAX_BYTE_SIZE = USHORT ; max length in bytes ASSEMBLY_QUALIFIED_NAME = US_VARCHAR ; name of the CLR assembly UDT_METADATA = ASSEMBLY_QUALIFIED_NAME UDT_INFO_IN_COLMETADATA = MAX_BYTE_SIZE DB_NAME SCHEMA_NAME TYPE_NAME UDT_METADATA UDT_INFO_IN_RPC = DB_NAME ; database name of the UDT SCHEMA_NAME ; schema name of the UDT TYPE_NAME ; type name of the UDT UDT_INFO = UDT_INFO_IN_COLMETADATA ;when sent as part of COLMETADATA / UDT_INFO_IN_RPC ;when sent as part of RPC call
MAX_BYTE_SIZE is only sent from the server to the client in COLMETADATA (section 2.2.7.4) and is an unsigned short with a value within the range 1 to 8000 or 0xFFFF. The value 0xFFFF signifies the maximum LOB size indicating a UDT with a maximum size greater than 8000 bytes (also referred to as a Large UDT; introduced in TDS 7.3). MAX_BYTE_SIZE is not sent to the server as part of RPC calls.
Note UserType in the COLMETADATA stream is either 0x0000 or 0x00000000 for UDTs, depending on the TDS version that is used. The actual data value format associated with a UDT data type definition stream is specified in [MS-SSCLRT].