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 detect property values automatically, set the DataConnectionExtenderBase.AutoDetect property to True. In this case ADO.NET DataExtender will detect a type of database server represented by a corresponding Table Adapter connection. If this database server is familiar to ADO.NET DataExtender, then property values of the connection information object will be assigned automatically. The type of server is identified through the DataConnectionExtenderBase.ServerType property, if the server type is not recognized by ADO.NET DataExtender then this property is ServerTypeEnum.Unknown.
When the server type is unknown you can manually set the connection information property values. To do this, ensure that DataConnectionExtenderBase.AutoDetect is set to False and DataTableConnectionExtender.BaseConnection to a null value, and then you can set property values explicitly.
Usually, the only connection is used for all or most Table Adapters of a typed dataset. To make connection information management more flexible, ADO.NET DataExtender allows you to define one or more DataSetConnectionExtender objects in the DataSetExtender.ConnectionInfos collection and simply inheriting their values in DataTableExtender.ConnectionInfo objects. In order to use this capability, just set the DataTableExtender.ConnectionInfo.DataTableConnectionExtender.BaseConnection property value to an instance of a DataSetConnectionExtender object from the DataSetExtender.ConnectionInfos collection.
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.