View Source Tds.Protocol.Grammar (Tds v2.3.1)

Grammar Definition for Token Description, General Rules.

Data structure encodings in TDS are defined in terms of the fundamental definitions.

Link to this section Summary

Functions

A single bit value of either 0 or 1.

An unsigned single byte (8-bit) value.

An unsigned single byte (8-bit) value representing the length of the associated data.

A 2-byte (16-bit) or 4-byte (32-bit) value representing a T-SQL NULL value for a character or binary data type.

An unsigned 4-byte (32-bit) value.

A FRESERVEDBIT is a BIT value used for padding that does not transmit information.

A FRESERVEDBYTE is a BYTE value used for padding that does not transmit information.

A single byte (8-bit) value representing a NULL value.

A signed 4-byte (32-bit) value.

A signed 4-byte (32-bit) value representing the length of the associated data.

A signed 8-byte (64-bit) value.

An unsigned single byte (8-bit) value representing the precision of a numeric number.

An unsigned single byte (8-bit) value representing the scale of a numeric number.

An unsigned single byte (8-bit) value representing a character.

An unsigned 4-byte (32-bit) value.

An unsigned 8-byte (64-bit) value.

An unsigned 8-byte (64-bit) value representing the length of the associated data.

A single Unicode character in UCS-2 encoding, as specified in Unicode.

An unsigned 2-byte (16-bit) value.

An unsigned 2-byte (16-bit) value representing the length of the associated character or binary data.

An unsigned 2-byte (16-bit) value representing the length of the associated data.

Link to this section Functions

A single bit value of either 0 or 1.

An unsigned single byte (8-bit) value.

The range is 0 to 255.

An unsigned single byte (8-bit) value representing the length of the associated data.

The range is 0 to 255.

Link to this macro

charbin_null(n \\ 2)

View Source (macro)

A 2-byte (16-bit) or 4-byte (32-bit) value representing a T-SQL NULL value for a character or binary data type.

Please refer to TYPE_VARBYTE (see section 2.2.5.2.3 in MS-TDS.pdf) for additional details.

An unsigned 4-byte (32-bit) value.

The range when used as a numeric value is 0 to (2^32)- 1.

Link to this macro

freservedbit(n \\ 1)

View Source (macro)

A FRESERVEDBIT is a BIT value used for padding that does not transmit information.

FRESERVEDBIT fields SHOULD be set to 0b0 and MUST be ignored on receipt.

Link to this macro

freservedbyte(n \\ 1)

View Source (macro)

A FRESERVEDBYTE is a BYTE value used for padding that does not transmit information.

FRESERVEDBYTE fields SHOULD be set to 0x00 and MUST be ignored on receipt.

A single byte (8-bit) value representing a NULL value.

A signed 4-byte (32-bit) value.

The range is -(2^31) to (2^31)-1.

A signed 4-byte (32-bit) value representing the length of the associated data.

The range is -(2^31) to (2^31)-1.

A signed 8-byte (64-bit) value.

The range is –(2^63) to (2^63)-1.

An unsigned single byte (8-bit) value representing the precision of a numeric number.

An unsigned single byte (8-bit) value representing the scale of a numeric number.

An unsigned single byte (8-bit) value representing a character.

The range is 0 to 255.

An unsigned 4-byte (32-bit) value.

The range is 0 to (2^32)-1.

An unsigned 8-byte (64-bit) value.

The range is 0 to (2^64)-1.

Link to this macro

ulonglonglen()

View Source (macro)

An unsigned 8-byte (64-bit) value representing the length of the associated data.

The range is 0 to (2^64)-1.

Link to this macro

unicodechar(n \\ 1)

View Source (macro)

A single Unicode character in UCS-2 encoding, as specified in Unicode.

An unsigned 2-byte (16-bit) value.

The range is 0 to 65535.

Link to this macro

ushortcharbinlen()

View Source (macro)

An unsigned 2-byte (16-bit) value representing the length of the associated character or binary data.

The range is 0 to 8000.

An unsigned 2-byte (16-bit) value representing the length of the associated data.

The range is 0 to 65535.