464 Part IV Database and Web Programming
- Click the SQL statement text box below the grid pane to update the Query Builder
window.
A new clause (ORDER BY [Last Name]) is added to the SQL statement box, and your
screen looks like this:
This is the strength of the Query Builder tool—it automatically builds the SQL
statements for you in the SQL statement box.
- Click OK to complete your query.
Visual Studio closes the Query Builder and displays your new query in the Search
Criteria Builder dialog box. The name of the query (SortLastNames) is listed, as well as
the SQL statements that make up the sort.
- Click OK to close the Search Criteria Builder dialog box, and then configure the
Last_NameTextBox object to list names in ascending alphabetical order.
The process has also created a SortLastNamesToolStrip object in the component tray
below the form. The Designer and component tray now look like the screen shot shown
on the following page.