ComponentOne DataObjects for .NET
Creating a Schema with the Import Wizard
DataObjects for .NET Task-Based Help > Creating a Schema with the Import Wizard

To use the Import Wizard to create a schema based on the structured information stored in a specified database, complete the following steps:

  1. Add a C1SchemaDef control to your form.
  2. Select the C1SchemaDef component and click the smart tag to open the C1SchemaDef Tasks menu.
  3. Select Schema Designer. The Import Wizard appears.
  4. TheImport Wizard guidesyou through the steps of connecting to a database. You can either use an existingconnection or create a new one.
    • To use an existing database connection, select it from the Connection string drop-down list.
    • To create a new connection:
    1. Select “Use new connection string” from the Connection drop-down list and check the “Save connection in schema” check box.
    2. Click the ellipsis button underConnection string. The standard OLE DB Data Link Properties window appears.
    3.   Click the Provider tab and select the data to connect to.
    4. Click the Connection tab and select a database. Enter a user name and password, if necessary.
    5. Click the Test Connection button to make sure that you have successfully connected to the database or server and click OK to return to the Import Wizard. The new string appears in the ConnectionString property box.
      Note: Using OLE DB is only one option. DataObjects for .NET supports other .NET data providers as well, see Database Connections. The information you must specify depends on the Provider you choose.
  5. Enter any information necessary to connect to the specified database in the remaining fields and click Next:
    Field Description
    Connection type Choose from Custom, MSOracle, OLE DB, Oracle, SQL Server
    User name Username used to connect to the database
    Password Password to connect to the database
    Connection timeout Timeout, in seconds
    Import objects Types of objects to import from the database: tables, views, aliases, or any combination of the these
  6. Select objects for import from the list of Available tables (also, views and aliases, if included) in the database structure. Click the arrows to move the tables to the Create schema tables box. There is also a check box that determines whether available foreign key information is used to create relations. If it is unchecked, no relations will be created.
  7. Click Finish to completethe Import Wizard and open the ComponentOne DataObjects Schema Designer.