Data Access Getting Started > Database Features > Using Selection and Display Criteria
 
Using Selection and Display Criteria
You are now going to modify how the list of employees appears in the table gadget of the employdb application. You want to display only the employees whose employee number is less than 8, in alphabetical order by name and without their salary information.
1. Make sure you are in Selection editing mode . Click the EMP_DS data source gadget (or double-click it if no inspector panel is open).
The SQL Data Source inspector appears.
2. On the Select page:
*Type <8 in the Where cell of the EMPNO column to list only those employees whose employee number is less than 8.
*Choose Asc (ascending) in the Order cell of the NAME column to sort the entries in alphabetical order by name.
Note: Selecting No from the Order cell combo box menu leaves the cell empty. If the cell is left empty, the default is used, which is a random order.
3. Click the Look page and change Yes to No in the Visible cell of the Salary column to prevent the SALARY column from being displayed. You may have to use the scroll bar on the left to move down through the rows of the table so that you can see the Visible row.
4. Click Apply in the EMP_DS SQL Data Source inspector.
The salary column disappears from the table gadget in the Main window.
5. Click the Active button in the Main window, then press the F9 key to update the data source.
The table gadget changes to display only employees whose employee numbers are from 1 to 7, in alphabetical order by name.

Version 5.8
Copyright © 2014, Rogue Wave Software, Inc. All Rights Reserved.