In this lesson, you will build a query that retrieves information from the Employees database to display on your Home page.
From the toolbar, place a Recordset object on the Home page. This will define the set of results the query will return.
The Recordset Object Properties Palette will appear.
Type EmployeeList
in the Name field. This will be the name of your Recordset.
Next, you will define your Recordset by selecting
the table and fields that will be queried.
Double-click to open the SQL Wizard.
Select the Employees
table from the "Table Name" drop-down list.
You will see the Employees
datafields listed in the Fields section.
Highlight all datafields listed. If a datafield(s)
is not highlighted, the field will not be queried and no data will be
returned.
Click OK to close the SQL Wizard.
Now, you can determine how your Recordset results will be returned.
Type LastName
in the OrderBy field. This will
use the LastName datafield to order the records when displayed.
Choose Ascending
in the Sort field to display
the employee information, after ordered by LastName, in ascending (A-->Z)
order.
Next, you will add objects that will iterate through your recordset and display the query results.