ComponentOne ADO.NET DataExtender
ADO.NET DataExtender Task-Based Help / Using C1DataViewSet with an Untyped ADO.NET DataSet
In This Topic
    Using C1DataViewSet with an Untyped ADO.NET DataSet
    In This Topic

    This topic demonstrates how to use C1DataViewSet in conjunction with an untyped ADO.NET DataSet, where data fetching and committing are performed by means other than the C1DataViewSet. It assumes you have created a project with a textbox, three buttons and three DataGridView controls.

    Note: C1DataViewSet only allows the user to show and edit data from untyped DataSet tables according to its C1DataView(s) definitions.

    To begin, complete the following steps:

    1. Create an untyped DataSet by adding a DataSet control to the form and connecting the C1DataViewSet to dataSet1. For more information on creating an untyped DataSet, see the Microsoft Visual Studio Documentation.
    2. To connect dataGridView1 to the C1DataViewSet, set the DataGridView.DataSource property to C1DataViewSet1.
    3. Set dataGrid1's DataGridView.DataMember property to DataView.
    4. From the C1ViewSetDesignerForm, select the DataView's Definition property and enter the following definition to establish a single view: Select * From Orders join [Order Details]
    5. Add an OleDbConnection and two OleDbDataAdapter controls to your form.

      Configure the settings to create a data connection that allows the adapter to communicate with the C1NWind.mdb database. For more information on Data Adapter configuration, see the Microsoft Visual Studio Documentation.

    6. Set the OleDbConnection.ConnectionString property to C1NWind.mdb to create a data connection to the specific database.
    7. Change the OleDbAdapter1.Name property to ordersDataAdapter and the OleDbAdapter2.Name property to OrdDetDataAdapter.

    Sample Available

    For the complete sample, see the UntypedDataSet sample, which is available for download from the ComponentOne HelpCentral Sample page.