
This dialog allows you to control the most important aspects of the command that WordPage generates. You invoke this dialog with the “Edit Query” option in the menu that appears when you click the “WordPage Options” button on a datasource. The following list discusses each item in more detail.
Tables |
To edit the tables accessed by the command click the “Edit” button. The table editor is discussed in detail below. |
||||||||
|
Allow Filters in request |
When processing a request from the web browser a WordPage document has four options for what fields will be allowed as filters from the request. These options are:
|
||||||||
|
Require filter in request |
If this option is checked then the document retrieves no data unless at least one filter is specified. This is to prevent unqualified (or “runaway”) select commands from being issued to the database. In general this option should be on if the command generated by WordPage would return more than a few hundred rows in the absence of a filter. |
||||||||
|
Allow order by to be determined by request |
If this option is on then the WordPage document allows sorting parameters to be defined in the request. This is discussed in more detail later. |
||||||||
Page Size |
If this option is zero then all rows are retrieved as a single page. If Page Size is not zero then it indicates the number of rows that should be treated as a single page. More information on paging through result sets is provided below. |
||||||||
|
Advanced |
Press the “Advanced” button to show the additional items discussed below. |
If you press the “Advanced” button the screen changes to look like this:

These items are intended for use by WordPage authors who are comfortable with SQL syntax and want more control over the select command that WordPage generates. The additional items are:
Distinct |
If checked WordPage includes a “distinct” keyword in the command. This causes duplicate rows to be suppressed. |
|
Top/Percent |
Some databases allow a syntax like “top 5” or “top 10 percent” to be specified in the command. If your database supports it you may use these options to include this clause. |
|
Column List |
By default WordPage retrieves the columns that are referenced in the document. If you have additional columns that must be retrieved they may be specified here. |
|
Where clause |
WordPage generates a WHERE clause based on the “Allow filter in request” setting and the filters provided to the server in the request. If there is additional filtering information you wish to provide place it here. |
|
Having clause |
For the filters that WordPage generates it knows whether to include it in the WHERE or HAVING clause based on whether or not the field is an aggregate. If you have specific text you want in the HAVING clause specify it here. |
|
Order by |
This is the ORDER BY clause that will be used unless overridden by parameters in the request that invokes the ASP document. |
When you select a non-zero value for the Page Size option the behavior of a WordPage document changes slightly.
§ StartLoop…EndLoop only retrieve a single page instead of the entire result set.
§ When the WordPage document is first accessed the entire result set is cached on the web server for rapid access.
§ The WordPage document looks for “_Page=nn” in the request to indicate which page of the result set to display.
§ The Var.Page and Var.PageCount variables are only valid for documents that have a non-zero page size.
To allow the user to navigate through the result set it is normal to provide a “Next Page” and “Previous Page” button. WordPage makes this easy. Create the text or graphic that you want to use and select it. Then use the “NextLink” or “PrevLink” commands in the command list to turn your selection into the appropriate hyperlink.