Select Table
The purpose of the Select a Table screen is to allow you to choose the table in the data source from which to select fields for display. JDesignerPro allows you to join any number of relational tables for use on the same component. You may want to have a form where more than one table is used in a master/detail layout, a data-entry form, report or other form.
When you move to the Select a Table screen it will automatically display the available tables in the chosen data source. The tables will appear in the Result List on the left. The top portion of the list is the primary table and the bottom portion is where you select secondary tables. Each join must be a proper relation between the tables or the build will fail.
If all the fields you need for your form are in one table, you dont need to do a join. In this case simply select the table you need from the upper list.
Select a Table Settings:
Primary Table list. This is the primary table to be used in your form, usually as the detail section of a master/detail. You can select only one table from the Primary Table list. To see the property details for the table, double-click the table name then click the Table Details tab to reveal the information. Note: none of the fields on this screen may be edited.
Secondary Table list. This is the same set of tables as the Primary table list. Here you select one or more tables to be used in joins with the Primary table. There s a known problem when running JDesignerPro under MS-VJ++ or under the JDesignerPro icon using the Microsoft Java -SDK: due to the MS Java implementation, lists that accept multiple selections are not given scroll bars. To scroll through such a list first click the last element at the bottom, then click it again and hold the mouse down. Now drag the mouse downward and the list will scroll. Highlight the desired element when you find it, the first element clicked on will not have been highlighted. When running JDesignerPro under the Netscape Navigator or Communicator a scroll bar will appear.
Table Join Definition. This sub-tab displays three pull down lists and two buttons. These lists will be populated with the names of the columns from the tables chosen in the Primary and Secondary Table lists. Only if you select a table in the secondary list will these pull downs display the column names. When you select a table in the Secondary Table list, it is given an alias letter. Each subsequent table you choose is given an alias of the following letter.
Aliases are used in front of the column names in the join criteria pull-downs. An alias is simply a letter a, b, c, etc. Aliases are used only for convenience within JDesignerPro. They are not assigned permanently to the tables or columns. The letter a is always used as the alias for the Primary Table. The letter b is used for the first Secondary Table join, c for the second join, etc.
For example, to join two tables, select one table from the Primary list and one from the Secondary list. Then pull down the Join Criteria lists. From these lists select a.[column] and b.[column]. Choose an operator in the center pull-down and press Add. The join will appear, such as a.order_number = b.order_number. If you select another table in the Secondary list, it will be given alias c and its columns will have a c in front of them in the Table Join Definition Pull-downs. To delete a join, simply highlight it and press the Remove button. Note: due to caching mechanisms in browsers, you may need to clear the disk and memory caches between two builds that join different tables.
The alias letters are given top-down, not in the order the tables were selected. This means out of two tables in the Secondary table list, if you start by selecting the lower table, it will take letter b. Then if you select the table above it in the list, its alias will become b and the lower tables will change from b to c.
Table Details. This sub-tab shows the table definition details for the selected table. Double-click the table name in one of the lists at the left to bring up its details. This information is for viewing only, these are not editable fields. This screen is handy for keeping track of the aliases of the tables being used for multiple joins.
On the Table Details screen:
The Selected Data Source field simply shows the data source selected in the previous screen.
The path of the table appears in the Database/Qualifier field.
The Owner field shows the ownership account for that table.
The Remarks field displays remarks returned by ODBC when the table was located, if any are found.
The alias tells you which letter has been given to this table for the join criteria pull-downs.
The Accept button will move you to the Select Columns screen when you have chosen your tables and joins. The Reset button will undo your table and joins selections.
Select a Table Action Summary:
- Click a table name in the Primary Table list to select it.
- Click one or more tables in the Secondary Table list, if you want to do join(s) to the Primary Table. If you wish to build a form over a single table, you do not need to select any tables in the Secondary list.
- To join, enter the required join conditions for the selected tables by using the pull down lists and the "Add" and "Remove" buttons. Only proper joins will create an error free form when compiled and loaded.
Note: You may find that tables from previous builds are displayed in these pull downs. In this case, close JDesignerPro, clear the caches in your browser and restart JDesignerPro. To clear the caches, see the explanation in the introduction paragraph of this section, JDesignerPro Builder - Data Selection.
Once you have made your selections, press the Accept button. The Accept button enters your request and moves you to the Select Columns screen.