Export (0) Print
Expand All

2.2.7.3 COLINFO

Token Stream Name:

COLINFO

Token Stream Function:

Describes the column information in browse mode (described in [MSDN-BROWSE]), sp_cursoropen, and sp_cursorfetch.

Token Stream Comments

  • The token value is 0xA5.

  • The TABNAME token contains the actual table name associated with COLINFO.

Token Stream Specific Rules:

TokenType        =   BYTE
Length           =   USHORT

ColNum           =   BYTE
TableNum         =   BYTE
Status           =   BYTE
ColName          =   B_VARCHAR

ColProperty      =   ColNum
                     TableNum
                     Status
                     [ColName]

The ColInfo element is repeated for each column in the result set.

Token Stream Definition:

COLINFO          =   TokenType
                     Length
                     1*CpLProperty

Token Stream Parameter Details:

Parameter

Description

TokenType

COLINFO_TOKEN

Length

The actual data length, in bytes, of the ColProperty stream. The length does not include token type and length field.

ColNum

The column number in the result set.

TableNum

The number of the base table that the column was derived from. The value is 0 if the value of Status is EXPRESSION.

Status

0x4: EXPRESSION (the column was the result of an expression).

0x8: KEY (the column is part of a key for the associated table).

0x10: HIDDEN (the column was not requested, but was added because it was part of a key for the associated table).

0x20: DIFFERENT_NAME (the column name is different than the requested column name in the case of a column alias).

ColName

The base column name. This only occurs if DIFFERENT_NAME is set in Status.

 
Show:
© 2014 Microsoft