Parameterized Computed Child Rowsets

Important

This feature will be removed in a future version of Windows. Avoid using this feature in new development work, and plan to modify applications that currently use this feature. Instead, applications should use XML.

The Data Shaping Service for OLE DB allows you to insert another level of child rowsets while still executing the parameterized command for the lowest child rowset. This allows you to build parameterized hierarchies that have one or more computed rowsets between the parent rowset that supplies the parameter values and the child rowset created by the parameterized provider command. The parameters are implicitly added to the computed rowset as hidden columns and implicitly become part of the BY clause.

Consider a hierarchy built upon a parameterized compute statement:

SHAPE {select * from Customers}
   APPEND
      ((SHAPE
         {select orders.cust_id, orderItem.* from Orders, OrderItem
            where cust_id = ? and orders.order_id = orderItems.order_id}
            AS rsOrderItems
         COMPUTE rsOrderItems BY order_id)
      RELATE cust_id to PARAMETER 0)
   AS chpCustOrder

This results in the following:

hierarchy with computed rowsets