3.1.1.2.3 Algorithm for Producing a TableGram from a RecordSet or a RecordSet from a TableGram

The TableGram is a direct encoding of the contents of a RecordSet. This encoding sequence is as follows:

Encode the adtgResultDescriptor (section 2.2.3.14.3.1) to define the overall shape of the RecordSet. The result descriptor MUST contain:

  • CursorModel - Set to the cursor model of the RecordSet.

  • TotalColumns - The count of all the columns in the parent table added with all of the columns in its child tables.

  • VisibleColumns - The count of all of the visible columns in the parent table added with all of the visible columns in its child tables.

  • TableCount - The number of tables in this TableGram.

Starting at the parent RecordSet, apply the algorithm from section 3.1.1.2.4.