ComponentOne ADO.NET DataExtender
ADO.NET DataExtender Quick Start / Step 1 of 4: Connect to a Data Source
In This Topic
    Step 1 of 4: Connect to a Data Source
    In This Topic

    To begin, create a .NET project and add the C1DataViewSet component to your form. To set up your new Windows form and connect to a data source, complete the following steps:

    1. Click the smart tag () located above the C1DataViewSet component to open its C1DataViewSet Tasks menu.
    2. From the C1DataViewSet Tasks menu, select the Choose DataSet drop-down arrow and select Add Project Data Source.
    3. The DataSource Configuration Wizard appears, and DataBase is selected. Click Next.
    4. Click New Connection to locate and connect to a database.
    5. Leave the Data source set to Microsoft Access Database File.
    6. Click Browse and select C1NWind.mdb located in the samples directory that is located in one of the following directories: Documents\ComponentOne Samples\Common        
    7. Then click Open. You can test the connection and then click OK.
    8. The connection string appears in the drop-down list. Click Next.
    9. Since it is not necessary to copy the database to your project, click No in the dialog box.
    10. Click Next to save the connection string as C1NWindConnectionString.
    11. Select Tables, and then click Finish to complete your datasource configuration.
    12. Select C1NWindDataSet to bind the database to your project.
          

    You have successfully added the C1DataViewSet component to your Windows form and connected to a data source. The next topic shows how to define a view.

    See Also