ComponentOne ADO.NET DataExtender
Working with C1DataViewSet / C1DataView Definitions / Composite View Definition / Creating a Composite View Definition
In This Topic
    Creating a Composite View Definition
    In This Topic

    A composite table can contain multiple table views based on a single table. In other words, a simple table can occur several times in a composite table diagram. Users can expose multiple related tables as a single rowset by defining a composite view, either visually or using an SQL-like statement.


    For an example showing how to set up a data model for a Windows form and create a C1DataViewSet with a composite view, see the C1DataExtender video, which is available for download from the ComponentOne HelpCentral Videos page.

    To create a composite view definition that joins data from multiple tables together in one view, complete the following steps:

    1. Click the smart tag () above the C1DataViewSet component and select Edit from its task menu. The C1ViewSetDesignerForm appears.
    2. Click the Add View button. The Add View dialog box appears.
    3. Select a parent view from the right pane, and select Composite view from the list of child tables.
    4. Click Add.

      The C1DataView Definition Statement Builder opens. The Diagram View represents a view definition as a diagram, which allows you to add tables and define table and relation properties.

      Note: Alternatively, you can access the C1Data View Definition Statement Builder by clicking the ellipsis button next to the Definition property.
    5. Click the Add Child Table button. The Add Child Table dialog box appears.
    6. Select Orders from the list of available tables under Select a child table to add.
    7. Click Add.
    8. With Orders selected as the parent table in the right pane, select Order Details from the list of tables under Select a child table to add. In this example we are creating an OUTER join, which is selected by default.
    9. Click Add, and then Close.

      The C1DataView Definition Statement Builder now contains the definition we just created. It does not contain the OUTER keyword, so JOIN is treated as OUTER.


    See Also