3.2.4.2.2 Sending a CPMCreateQueryIn Request

The higher layer will typically provide information for the query creation after the protocol client is connected. The higher layer provides the client with a restrictions set, columns set, sort order rules and categorization set (each of them can be omitted), rowset properties, and property ID mapper structure.

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

  1. Prepare a CPMCreateQueryIn request as follows.

    1. If a columns set is present, set CColumnSetPresent to 0x01, and fill the ColumnsSet field.

    2. If restrictions are present, set CRestrictionPresent to 0x01, and fill the Restriction field.

    3. If a sort set is present, set CSortSetPresent to 0x01, and fill the SortSet field.

    4. If a categorization set is present, set CCategorizationSetPresent to 0x01, and fill the CategorizationSet field.

    5. Set the rest of the fields as specified in section 2.2.3.8.

  2. Calculate the _ulCheckSum field in the header.

  3. Send the CPMCreateQueryIn message to the server.

  4. Wait to receive the CPMCreateQueryOut message (see section 3.2.5.1), silently discarding all other messages.

  5. Report back the value of the _status field of the response (and, if it was successful, the array of cursor handles and informative Boolean values, as specified in section 2.2.3.9) to the higher layer.