ComponentOne DataObjects for .NET
Step 1 of 4: Setting up the Form and Importing a Database Structure
DataObjects for .NET Quick Start > Step 1 of 4: Setting up the Form and Importing a Database Structure

In this step you'll set up the form, add DataObjects for .NET components, and import a database structure using the Schema Designer. Complete the following steps:

  1. Create a new .NET 2.0 project.
  2. Navigate to the Toolbox and add the C1DataSet, C1SchemaDef, and C1TrueDBGrid components to the form.
  3. Click C1TrueDBGrid1's smart tag to open the C1TrueDBGrid Tasks menu and select Dock in parent container.
  4. Click C1SchemaDef1's smart tag to open the C1SchemaDef Tasks menu, and select Schema Designer.

    The DataObjects Schema Designer opens and the Import Database Structure Wizard appears. For more information about the C1SchemaDef Tasks menu, see C1SchemaDef Tasks and Context Menus.
  5. Click the ellipsis button to the right of the connection string. The standard OLE DB Data Link Properties dialog box opens.
    Note: Select Schema | Import database structure in the Schema Designer to open the Import Wizard if it does not automatically appear.

  6. In the Connection tab, click the ellipsis button under Select or enter a database name to locate a database.
  7. Locate the C1NWind.mdb database (by default installed in Documents\ComponentOne Samples\Common) and click Open. If desired you can test the connection now by clicking the Test Connection button.
  8. Click OK to close the DataLink Properties dialog box and import the connection string.
  9. Click Next. In this window, you can select the tables to import into the schema.
  10. To select all of the available tables, click the >> button to add all the tables to the schema, and click Finish. The Import Wizard creates the schema and closes.

You've just completed step 1 of the quick start guide; you've set up the form, added DataObjects for .NET components, and imported a database structure. In the next step you'll create a simple data schema using the Schema Designer.