ComponentOne ADO.NET DataExtender
Working with DataSetExtender / Connection Information
In This Topic
    Connection Information
    In This Topic

    DataTable objects of a typed dataset usually have a corresponding Table Adapter that defines a connection (a DbConnection derived object) used to retrieve and update the data of a DataTable from/to the database server, along with other attributes devoted to the client and server data interchange.

    The C1DataViewSet needs some additional information concerning the specifics of the database server, which is referenced in the connection of a Table Adapter. This additional information helps C1DataViewSet to provide the entirety of its capabilities; for example, automatically refreshing the server generated primary key value in a client row.

    This information is represented in the DataConnectionExtenderBase derived class, DataTableConnectionExtender, belonging to the DataTableExtender objects of DataSetExtender and is accessible through the DataTableExtender.ConnectionInfo property.

    The property values of the DataTableConnectionExtender objects can be:

    To connect DataSetExtender to the specific typed dataset:

    1. Select DataSetExtender1.cs (or DataSetExtender1.vb) from the Solution Explorer window and double-click it to open it.
    2. From the Schema Extender tree, select the DataTableExtender that you wish to define.
    3. Modify its DataTableConnectionExtender.BaseConnection property through the Visual Studio Properties window:

    When DataSetExtender is initialized for the first time after connecting it to the specific typed dataset, it investigates connections defined in Table Adapters and creates a distinct list of corresponding DataSetConnectionExtender objects in the DataSetExtender.ConnectionInfos collection. Usually it will create a single DataSetConnectionExtender object. For each DataTableExtender object contained in the DataSetExtender the DataTableConnectionExtender.BaseConnection property value is set to the instance of the corresponding DataSetConnectionExtender object from the DataSetExtender.ConnectionInfos collection. Doing this will ease management in the future. If you need to make database server adjustments, simply change the property values of the global DataSetConnectionExtender object which will automatically change the property values of all DataTableExtender.ConnectionInfo objects.

    See Also