Shaping Commands
Shaping commands allow you to create
hierarchical recordsets in two ways. The first way is done through
the APPEND command. The APPEND
command can be used to attach a child recordset to a parent based
upon a common field value or values. One field value in the parent
recordset is equivalent to all of the field values in its child
recordset. The APPEND command can add not only
chapter columns (pointing to child recordsets), it can also add
calculated, aggregated, and fabricated columns.
The second method of creating hierarchical recordsets in ADO is to
use the COMPUTE command. This method generates a
parent recordset from a child recordset. Parent columns are created
by aggregation operations over a column of the child, an expression
on an entire row of the recordset, a grouping column (using the
keyword BY), or by creating a new blank column. In
addition, one of the parent recordset’s columns must be a
chapter column pointing to the child recordset. The parent can also
be a calculated, aggregated, or fabricated column.
APPEND Command
The APPEND command is used to append a child
recordset to a column within a parent recordset. The syntax of the
APPEND command is as follows:
SHAPE {parent-command} [[AS] parent-alias]
APPEND ({child-command} [AS] child-alias
RELATE parent-column TO child-column) [[AS] chapter-alias]...In this syntax, the parent-command and child-commands can be one of four things:
A command that is translated by the underlying data provider (usually ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access