C1DataViewSet Data Sources
C1DataViewSet can represent data from typed or untyped ADO.NET dataset or a connection string. Here are these three types of data sources briefly introduced:
- Typed ADO.NET Dataset
The DataSet property connects C1DataViewSet to a typed dataset component that has been placed on a Form. In this case, C1DataViewSet retrieves Table Adapters, defined as a part of typed dataset definition, for each DataTable. To fetch data and commit changes back to the server, C1DataViewSet uses the information represented by adapters.
- Untyped ADO.NET Dataset
The DataSet property connects C1DataViewSet to an untyped dataset component that has been placed on a Form.
In this case, C1DataViewSet is not able to fetch data and commit changes back to the server. You should create DataTable objects, and manually fill and update their data back to the server. Note that the C1DataView(s) defined in a C1DataViewSet are only able to represent the data according to their definitions.
- Connection String
In this case, the ConnectionString and ConnectionProvider properties define a connection to a database. The ConnectionString property defines a database that is used as datasource. The ConnectionProvider property defines the name of the ADO.NET Data Provider that is used when connecting to the database. C1DataViewSet retrieves database schema information, automatically creates an internal ADO.NET dataset, which does not appear on the form, and works against it. This dataset is still accessible at run time through the DataSet property.
To connect to these data sources you must have a C1DataViewSet component on your form. The following sections explain the necessary steps you must take to make each connection.