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