2.2.3.15 CPMGetRowsIn

The CPMGetRowsIn message requests rows from a query. The format of the CPMGetRowsIn message that follows the header is shown in the following diagram.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

_hCursor

_cRowsToTransfer

_cbRowWidth

_cbSeek

_cbReserved

_cbReadBuffer

_ulClientBase

_fBwdFetch

eType

SeekDescription (variable)

...

_hCursor (4 bytes): A 32-bit value representing the handle from the CPMCreateQueryOut message identifying the query for which to retrieve rows.

_cRowsToTransfer (4 bytes): A 32-bit unsigned integer indicating the maximum number of rows that the client requests to receive in response to this message.

_cbRowWidth (4 bytes): A 32-bit unsigned integer indicating the length of a row in bytes.

_cbSeek (4 bytes): A 32-bit unsigned integer indicating the size of the message, beginning with eType.

_cbReserved (4 bytes): A 32-bit unsigned integer indicating the offset, in bytes, of the Rows field in the CPMGetRowsOut response message. This offset begins from the first byte of the message header and MUST be set such that the Rows field follows the SeekDescription field.

_cbReadBuffer (4 bytes): A 32-bit unsigned integer.

Note This field MUST be set to the maximum of the value of _cbRowWidth, or 1,000 times the value of _cRowsToTransfer rounded up to the nearest 512-byte multiple. The value MUST NOT exceed 0x00004000.

_ulClientBase (4 bytes): A 32-bit unsigned integer indicating the base value to use for pointer calculations in the row buffer. If 64-bit offsets are being used, the _ulReserved2 field of the message header is used as the upper 32 bits, and _ulClientBase is used as the lower 32 bits of a 64-bit value. See section 2.2.3.16.

_fBwdFetch (4 bytes): A 32-bit unsigned integer indicating the order in which to fetch the rows.

Note Rows can be fetched in an order different from that in which they are stored.

MUST be set to one of the following values.

Value

Meaning

0x00000000

The rows are to be fetched in forward order from the bookmark.

0x00000001

The rows are to be fetched in reverse order from the bookmark.

eType (4 bytes): A 32-bit unsigned integer. MUST contain one of the following values indicating the type of operation to perform.

Value

Meaning

eRowSeekNext

0x00000001

SeekDescription contains a CRowSeekNext structure.

eRowSeekAt

0x00000002

SeekDescription contains a CRowSeekAt structure.

eRowSeekAtRatio

0x00000003

SeekDescription contains a CRowSeekAtRatio structure.

eRowSeekByBookmark

0x00000004

SeekDescription contains a CRowSeekByBookmark structure.

SeekDescription (variable): This field MUST contain a structure of the type indicated by the eType value.