Shape Commands in General

See Also   

A Shape command defines the structure of an hierarchical Recordset, and the commands necessary to populate it with data.

A part of the Shape command is a query issued to the underlying data provider which returns a Recordset object. The query's syntax depends on the requirements of the underlying data provider. This will usually be Structured Query Language (SQL), although ADO doesn't require the use of any particular query language.

You could use an SQL JOIN clause to relate two tables; however, a hierarchical Recordset will represent the information more efficiently. Each row of a Recordset created by a JOIN repeats information redundantly from one of the tables. A hierarchical Recordset has only one parent Recordset for each of multiple child Recordset objects.

You can use parentheses to group parts for clarification.

Shape commands can be issued only by Recordset objects.

Shape commands can be nested. That is, the parent-command or child-command may itself be another Shape command.

For information about navigating a hierarchical Recordset, see Accessing Rows in a Hierarchical Recordset.