Before beginning this procedure, create a project using a DataDirect Connect template, as described in “Creating a New Project”, and add a data connection.
1
3 Right-click the Tables node, and select Add New Table. The Progress DataDirect Connect for ADO.NET Add Table Wizard appears.
4 Click Next. The Specify Table Name dialog box appears.
■ In the Table Schema drop-down list, select a table schema.
■ In the Table Name field, type a name for the table.
6 Click Next. The Specify Column(s) dialog box appears.
a Click Add to add a column to the table. The Column Name and Data Type fields become editable.
d If the column can have a Null value, select the Allow Null check box.
8 Click Next. The Specify Primary Key dialog box appears. Take one of the following actions:
■
■ If you want to specify a primary key for the table, select Create Primary Key, and then continue at Step 9.
10 Click Next. The Specify Unique Key(s) dialog box appears.
■ If you do not want to specify unique keys for the table, click Next. The Specify Foreign Key(s) dialog box appears. Continue at Step 14.
12 Click Add. The fields on the dialog box become selectable:
■ In the Unique Keys drop-down list, select a unique key.
■ In the Unique Key Name field, edit the name or accept the default name.
■ In the Available Columns list box, select one or more columns to be used to specify the unique key, and click the arrow to move them to the Selected Columns list box.
13 Click Next. The Specify Foreign Key(s) dialog box appears.
■ If you do not want to specify foreign keys for the table, click Next. The Review SQL dialog box appears. Continue at Step 17.
15 Click Add. The fields on the dialog box become selectable:
■ In the Foreign Keys drop-down list, select a foreign key.
■ In the Foreign Key Name field, edit the name or accept the default name.
■ In the Table Schema drop-down list, select a table schema.
■ In the Table Name drop-down list, select a table schema.
■ In the Foreign Key Column drop-down list, select one or more columns to be used to specify the foreign key.
■ In the Parent Table Column drop-down list, select the corresponding column from the parent table.
16 Click Next. The Review SQL dialog box appears.
■ If you are satisfied with the SQL statement, click Finish. The table that you created appears in Server Explorer under the Tables node for the connection.
■
18 Select the Edit SQL check box. The text in the Generated SQL field becomes editable.
19 When you are satisfied with your changes to the SQL statement, click Finish. The table that you created appears in Server Explorer under the Tables node for the connection.
1
3 Right-click the Views node, and select Add New View. The Progress DataDirect Connect for ADO.NET Add View Wizard welcome dialog box appears.
4 Click Next. The Specify View Name dialog box appears.
6 Click Next. The Select Table(s) and/or Column(s) dialog box appears.
7 In the List of Tables and columns list box, select the tables or columns that will make up the view, and click the arrow to move them to the Selected Columns column.
8 Click Next. The Review SQL dialog box appears.
■ If you are satisfied with the SQL statement, click Finish. The view that you created appears in Server Explorer under the Views node for the connection.
■
11 When you are satisfied with your changes to the SQL statement, click Finish. The view that you created appears in Server Explorer under the Views node for the connection.