3.2.4.2.4 Sending a CPMGetRowsIn Request

When the higher layer is about to receive rows information, it will provide the protocol client with valid cursor and chapter handles and give an appropriate seek description. Typically, a higher layer is expected to do so when it has a valid cursor and/or chapter handle, and the bindings have been set with the CPMSetBindingsIn message. To access the rowset in a chapter, the higher layer is to use the chapter handle received from the server in a previous CPMGetRowsOut message as ODBC property value (Chapter).

When this request is received from the higher layer, the client MUST perform the following:

  1. Determine what unsigned integer value to specify for the _cbReadBuffer field. To determine this value, the client MUST take the maximum value from the following:

    • One thousand times the value of the _cRowsToTransfer field.

    • The value of _cbRowWidth, rounded up to the nearest 512-byte multiple.

    • Take the higher of these two values, up to the 16-KB limit.

    • In cases where a single row is larger than 16 KB, the server cannot return results to this query.

  2. Specify a client base for variable-sized row data in the client address space in the _ulClientBase field.<44>

  3. Calculate the size of the seek description and set it in the _cbSeek field.

  4. Set the value of _cbReserved (which would act as an offset for the start of the rows contained in the Rows field in the CPMGetRowsOut message) to the value of _cbSeek plus 0x14.

  5. Send a CPMGetRowsIn message to the server.