Datasheet
4. The drop-down list shows configured data sources (from the Data Explorer) as well as an option
to create a new connection. Pick the existing connection and press
Next to go to the screen
shown in Figure 8-9:
Figure 8-9
Now you can select the columns you wish to show. You can pick multiple columns (the
* means
all columns from the table) from multiple tables. You simply select them individually. However,
when picking columns from multiple tables, you must join the tables. Remember our discussion
of linked tables and keys from the beginning of the chapter – you need the primary and foreign
key to join the tables.
5. Select the Products table and the ProductName column, and the Categories table and the
CategoryName column. Notice the Preview pane at the bottom of the window shows the SQL
statement, but without the tables joined together, as shown in Figure 8-10:
Figure 8-10
6. To join these tables together, we need a WHERE clause, so press the WHERE button to open the
WHERE Clause Builder window.
7. Select your options the same as shown in Figure 8-11:
263
Reading from Databases
57084_08.qxp 30/01/2004 8:03 PM Page 263