About selecting information
After creating a database connection (database connection: A connection that specifies the name, type, location, and optional information for a database file.), the Database Results Wizard shows the record sources (the names of the tables and views) in that database.
Represents a record source table containing employee information
Field labels indicating employee's first name, last name, and telephone number
Three employee records
A web page displaying first name, last name, and telephone number information for three employees
Once you select the fields to display, the Database Results Wizard enables you to filter the database results — that is, to display only the records that match the criteria you set. For example, you can filter a database to display only the records of employees with the same last name. When the page is browsed, only matching records are displayed.
Employee records in a database
Only records that meet the filter criteria are displayed in the web site
You can also sort records. For example, you can sort records alphabetically by last name, and then by first name.
If you already have a database results region, perform the steps below in any order, as needed. Otherwise, do them in the order presented here:
Choose a record source
Note On a page with an existing database results region, right-click the database results region, and then click Database Results Properties. The Database Results Wizard starts.
Select the database fields to display
After choosing a record source, determine what fields to show in the database results region and the order they're displayed in.
Note On a page with an existing database results region, right-click the database results region, and then click Database Results Properties. The Database Results Wizard starts.
Remove a field from the list
Select the field you want to remove, and then click Remove.
Change the field display order
Select the field you want to move, and then click Move Up or Move Down.
Add a field to the list
In the Available fields list, select the field you want to add, and then click Add to add the field to the Displayed fields list.
Specify criteria for filtering records
The Database Results Wizard can help you build a query to display in the database results region, as follows:
Note On a page with an existing database results region, right-click the database results region, and then click Database Results Properties. The Database Results Wizard starts.
For example, from a database of employees, you could select the LastName field.
For example, to filter all last names equal to "Smith," you would select Equal in the Comparison box.
For example, to display all last names equal to "Smith," you would enter Smith in the Value box.
Notes
Specify the sort order for database fields
Note In an existing database results region, right-click the database results region, and then click Database Results Properties. The Database Results Wizard starts.
Note You can add multiple fields to the Sort order list. Database results will be sorted by the first field in the list, and then they will be sorted by the second field in the list. For example, if you want to display a list of employees sorted by last name and then by first name, you would add the fields LastName and then FirstName to the Sort order list.
Create a custom query
You can create custom queries using Structured Query Language (SQL) (Structured Query Language (SQL): A database query and programming language widely used for accessing, querying, updating, and managing data in relational database systems.).