共用方式為


2.2.7.14 LOGINACK

Token Stream Name:

 LOGINACK

Token Stream Function:

Used to send a response to a login request (LOGIN7) to the client.

Token Stream Comments

  • The token value is 0xAD.

  • If a LOGINACK is not received by the client as part of the login procedure, the login to the server is unsuccessful.

Token Stream-Specific Rules:

 TokenType        =   BYTE
 Length           =   USHORT
 Interface        =   BYTE
 TDSVersion       =   DWORD
 ProgName         =   B_VARCHAR
  
 MajorVer         =   BYTE
 MinorVer         =   BYTE
 BuildNumHi       =   BYTE
 BuildNumLow      =   BYTE
  
 ProgVersion      =   MajorVer
                      MinorVer
                      BuildNumHi
                      BuildNumLow

Token Stream Definition:

 LOGINACK         =   TokenType
                      Length
                      Interface
                      TDSVersion
                      ProgName
                      ProgVersion

Token Stream Parameter Details

Parameter

Description

TokenType

LOGINACK_TOKEN

Length

The total length, in bytes, of the following fields: Interface, TDSVersion, ProgName, and ProgVersion.

Interface

The type of interface with which the server accepts client requests:

0: SQL_DFLT (server confirms that whatever is sent by the client is acceptable. If the client requested SQL_DFLT, SQL_TSQL is used).

1: SQL_TSQL (TSQL is accepted).

TDSVersion

The TDS version being used by the server.<65>

ProgName

The name of the server.

MajorVer

The major version number (0-255).

MinorVer

The minor version number (0-255).

BuildNumHi

The high byte of the build number (0-255).

BuildNumLow

The low byte of the build number (0-255).